Tutorial Setting DNS Server Pada Linux

Jalankan konsole dengan mengetik pada Run Command > konsole atau pergi ke Start Applications >
System Tools > Terminal
Copyright @ Postnix 2005 Postnix
[lab@server home]$ su
Password: [masukan password root]
[root@server home]#
Mengecek apakah file-file yang dibutuhkan sudah terinstall:
[root@server home]# rpm -qa grep dhcp
dhcp-3.0pl1-23
[root@server home]# rpm -qa grep bind
bind-9.2.1-16
redhat-config-bind-1.9.0-13
bind-utils-9.2.1-16
ypbind-1.11-4
[root@server home]# rpm -qa grep samba
samba-common-2.2.7a-7.9.0
samba-client-2.2.7a-7.9.0
samba-2.2.7a-7.9.0
redhat-config-samba-1.0.4-1
[root@server home]#
Jika belum terinstall, silakan install terlebih dahulu, agar lebih mudah, saya menyarankan untuk
menggunakan redhat-config-packages. Ketik di Run Command (Start Applications > Run
Command..) redhat-config-packages. Selanjutnya cari file-file tersebut dan install.Apabila sudah
terinstall,siap-siap buat perang tiada akhir...
Berikut langkah2nya
###################################################################################
---------------------setting ethernet (/etc/sysconfig/networking/devices/ifcfg-eth0)
[root@server home]# vi /etc/sysconfig/networking/devices/ifcfg-eth0 (u/ menulis/edit tekan tombol insert)
DEVICE=eth0 #nama device
BOOTPROTO=static
BROADCAST=192.168.5.255
IPADDR=192.168.5.254
NETMASK=255.255.255.0
NETWORK=192.168.5.0
ONBOOT=yes # dijalankan saat boot
Simpan file dengan menekan tombol escape/Esc kemudian ketik :wq kemudian tekan enter
[root@server home]#
###################################################################################
---------------------setting HOSTS (/etc/hosts)
[root@server home]# vi /etc/hosts (u/ menulis/edit tekan tombol insert)
Copyright @ Postnix 2005 Postnix
#Do not remove the following lines, or various programs
#that require network functionality will fails
127.0.0.1 localhost.localdomain localhost
192.168.5.254 server.daunpintu.net server
Simpan file dengan menekan tombol escape/Esc kemudian ketik :wq kemudian tekan enter
[root@server home]#
###################################################################################
----------------------setting RESOLV.CONF (/etc/resolv.conf)
[root@server home]# vi /etc/resolv.conf (kemudian u/ menulis/edit tekan tombol insert)
# Samakan dengan dibawah ini,atau konfigurasi sesuai kebutuhan
search daunpintu.net
nameserver 192.168.5.254
Simpan file dengan menekan tombol escape/Esc kemudian ketik :wq kemudian tekan enter
[root@server home]#
Saatnya restart network
[root@server /]# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@server /]#
Apabila tidak ada pesan error, berarti sejauh ini berhasil. Untuk memastikan, ping ke 192.168.5.254
[root@server named]# ping 192.168.5.254
64 bytes from 192.168.5.254: icmp_seq=0 ttl=128 time=0.366 ms
64 bytes from 192.168.5.254: icmp_seq=1 ttl=128 time=0.354 ms
64 bytes from 192.168.5.254: icmp_seq=2 ttl=128 time=0.309 ms
64 bytes from 192.168.5.254: icmp_seq=3 ttl=128 time=0.318 ms
64 bytes from 192.168.5.254: icmp_seq=4 ttl=128 time=0.250 ms
--- 192.168.5.254 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4044ms
rtt min /avg/max/dev = 0.250/0.297/0.354/0.044 ms
[root@server named]#
Good, semuanya berjalan lancar. Lanjutkan ke proses berikutnya.
Copyright @ Postnix 2005 Postnix
###################################################################################
###################################################################################
DNS SERVER (named) > BIND (Berkeley Internet Name Domain) DNS SERVER (named) > BIND (Berkeley Internet Name Domain)
Pengaturan DNS sebaiknya ditentukan sesuai kebutuhan, seperti pertanyaan pertama, apakah server ini
berlaku sebagai gateway, atau mail server, proxy server, web server, database server, backup server
atau yang lain?
Oleh karena itu, gw lebih serahkan sepenuhnya pada yang membacanya,huehehehe...
Letak konfigurasi bind yang terpenting ada di direktori:
/etc/named.conf
/var/named/
masih sebagai root, kita akan mengkonfigurasi file-file diatas..
NAMED.CONF (/etc/named.conf)
[root@server home]# vi /etc/named.conf
ketikkan baris dibawah ini, atau lebih baik backup file named.conf aslinya(buat jaga2), dan buat file
ini..
## named.conf - configuration for bind
#
# Generated automatically by redhat-config-bind, alchemist et al.
# Any changes not supported by redhat-config-bind should be put
# in /etc/named.custom
#
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
include "/etc/named.custom";
include "/etc/rndc.key";
zone "0.0.127.in-addr.arpa" {
type master;
file "0.0.127.in-addr.arpa.zone";
};
zone "localhost" {
type master;
file "localhost.zone";
};
zone "5.168.192.in-addr.arpa" {
type master; # script yang ditambahkan
file "5.168.192.in-addr.arpa.zone";
};
Copyright @ Postnix 2005 Postnix
zone "daunpintu.net" {
type master; # script yang ditambahkan
file "daunpintu.net.zone";
};
kalo sudah diketik semua, simpan file tersebut dengan mengetikkan :wq dan tekan [enter]
[root@server home]#
Penjelasan:
Perhatikan baris perintah berikut:
zone "daunpintu.net" { #menambahkan zona baru / domain baru yaitu daunpintu.net
type master; #merupakan master domain, domain utama...
file "daunpintu.net.zone"; #file database yang menyimpan konfigurasi seluruh domain dan
host
};
zone "5.168.192.in-addr.arpa" { #menambahkan zona reverse baru yaitu daunpintu.net
type master; #merupakan reverse master domain, domain reverse utama...
file "5.168.192.in-addr.arpa.zone"; #file database yang menyimpan konfigurasi seluruh
domain dan host
};
##################################################################################
file pada direktori /var/named/
[root@server home]# cd /var/named
[root@server named]# vi daunpintu.net.zone
ketikan perintah berikut: (isi file ini cuma contoh, dapat disesuaikan dengan kebutuhan)
$TTL 86400
@ IN SOA server.daunpintu.net. root.localhost (
2005911918 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
IN NS 192.168.5.254.
server IN A 192.168.5.254
cl001 IN A 192.168.5.11
cl002 IN A 192.168.5.12
Copyright @ Postnix 2005 Postnix
cl003 IN A 192.168.5.13
simpan file dengan mengetik > : + w + q
[root@server named]# vi 5.168.192.in-addr.arpa.zone
ketikkan perintah berikut: (Ingat, sekali lagi isi file ini cuma contoh, dapat disesuaikan dengan
kebutuhan)
$TTL 86400
5.168.192.in-addr.arpa. IN SOA server.daunpintu.net. root.daunpintu.net. (
2005121900 ; serial
28800 ; refresh
2700 ; retry
604800 ; expire
86400 ; ttl
)
IN NS server.daunpintu.net.
11 IN PTR cl001.daunpintu.net.
12 IN PTR cl002.daunpintu.net.
13 IN PTR cl003.daunpintu.net.
simpan file dengan mengetik > : + w + q
[root@server named]#
Kemudian restart service BIND dengan perintah:
[root@server named]# service named restart
Shutting down named: [ OK ]
Starting named: [ OK ]
[root@server named]#
Kalo udah, coba test dengan menjalankan perintah host
[root@server named]# host cl001
cl001.daunpintu.net has address 192.168.5.11
[root@server named]#
Setelah itu silakan ping ke cl001
[root@server named]# ping cl001
64 bytes from cl001.daunpintu.net (192.168.5.11): icmp_seq=0 ttl=128 time=0.366 ms
64 bytes from cl001.daunpintu.net (192.168.5.11): icmp_seq=1 ttl=128 time=0.354 ms
64 bytes from cl001.daunpintu.net (192.168.5.11): icmp_seq=2 ttl=128 time=0.309 ms
64 bytes from cl001.daunpintu.net (192.168.5.11): icmp_seq=3 ttl=128 time=0.318 ms
64 bytes from cl001.daunpintu.net (192.168.5.11): icmp_seq=4 ttl=128 time=0.250 ms
--- cl001.daunpintu.net ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4044ms
rtt min /avg/max/dev = 0.250/0.297/0.354/0.044 ms
Copyright @ Postnix 2005 Postnix
[root@server named]#
Berhasil, konfigurasi DNS telah berjalan dengan baik,


Langkah-langkah mikrotik yang dikonfigurasikan sebagai jaringan sederhana
1. Langkah pertama adalah install Mikrotik RouterOS pada PC atau pasang DOM.
2. Login Pada Mikrotik Routers melalui console :
MikroTik v2.9.7
Login: admin <enter>
Password: (kosongkan) <enter>
Sampai langkah ini kita sudah bisa masuk pada mesin Mikrotik. User default adalah admin
dan tanpa password, tinggal ketik admin kemudian tekan tombol enter.
3. Untuk keamanan ganti password default
[admin@Mikrotik] > password
old password: *****
new password: *****
retype new password: *****
[admin@ Mikrotik]] >
4. Mengganti nama Mikrotik Router, pada langkah ini nama server akan diganti menjadi “XAVIERO” (nama ini sih bebas2 aja mo diganti)
[admin@Mikrotik] > system identity set name=XAVIERO
[admin@XAVIERO] >
5. Melihat interface pada Mikrotik Router
[admin@XAVIERO] > interface print
Flags: X – disabled, D – dynamic, R – running
# NAME TYPE RX-RATE TX-RATE MTU
0 R ether1 ether 0 0 1500
1 R ether2 ether 0 0 1500
[admin@XAVIERO] >
6. Memberikan IP address pada interface Mikrotik. Misalkan ether1 akan kita gunakan untuk koneksi ke Internet dengan IP 192.168.0.1 dan ether2 akan kita gunakan untuk network local kita dengan IP 172.16.0.1
[admin@XAVIERO] > ip address add address=192.168.0.1
netmask=255.255.255.0 interface=ether1
[admin@XAVIERO] > ip address add address=172.16.0.1
netmask=255.255.255.0 interface=ether2
7. Melihat konfigurasi IP address yang sudah kita berikan
[admin@XAVIERO] >ip address print
Flags: X – disabled, I – invalid, D – dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.0.1/24 192.168.0.0 192.168.0.63 ether1
1 172.16.0.1/24 172.16.0.0 172.16.0.255 ether2
[admin@XAVIERO] >
8. Memberikan default Gateway, diasumsikan gateway untuk koneksi internet adalah 192.168.0.254
[admin@XAVIERO] > /ip route add gateway=192.168.0.254
9. Melihat Tabel routing pada Mikrotik Routers
[admin@XAVIERO] > ip route print
Flags: X – disabled, A – active, D – dynamic,
C – connect, S – static, r – rip, b – bgp, o – ospf
# DST-ADDRESS PREFSRC G GATEWAY DISTANCE INTERFACE
0 ADC 172.16.0.0/24 172.16.0.1 ether2
1 ADC 192.168.0.0/26 192.168.0.1 ether1
2 A S 0.0.0.0/0 r 192.168.0.254 ether1
[admin@XAVIERO] >
10. Tes Ping ke Gateway untuk memastikan konfigurasi sudah benar
[admin@XAVIERO] > ping 192.168.0.254
192.168.0.254 64 byte ping: ttl=64 time<1 ms
192.168.0.254 64 byte ping: ttl=64 time<1 ms
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0/0.0/0 ms
[admin@XAVIERO] >
11. Setup DNS pada Mikrotik Routers
[admin@XAVIERO] > ip dns set primary-dns=192.168.0.10 allow-remoterequests=no
[admin@XAVIERO] > ip dns set secondary-dns=192.168.0.11 allow-remoterequests=no
12. Melihat konfigurasi DNS
[admin@XAVIERO] > ip dns print
primary-dns: 192.168.0.10
secondary-dns: 192.168.0.11
allow-remote-requests: no
cache-size: 2048KiB
cache-max-ttl: 1w
cache-used: 16KiB
[admin@XAVIERO] >
13. Tes untuk akses domain, misalnya dengan ping nama domain
[admin@XAVIERO] > ping yahoo.com
216.109.112.135 64 byte ping: ttl=48 time=250 ms
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 571/571.0/571 ms
[admin@XAVIERO] >
Jika sudah berhasil reply berarti seting DNS sudah benar.
14. Setup Masquerading, Jika Mikrotik akan kita pergunakan sebagai gateway server maka agar client computer pada network dapat terkoneksi ke internet perlu kita masquerading.
[admin@XAVIERO]> ip firewall nat add action=masquerade outinterface=
ether1 chain:srcnat
[admin@XAVIERO] >
15. Melihat konfigurasi Masquerading
[admin@XAVIERO]ip firewall nat print
Flags: X – disabled, I – invalid, D – dynamic
0 chain=srcnat out-interface=ether1 action=masquerade
[admin@XAVIERO] >
Setelah langkah ini bisa dilakukan pemeriksaan untuk koneksi dari jaringan local. Dan jika berhasil berarti kita sudah berhasil melakukan instalasi Mikrotik Router sebagai Gateway server. Setelah terkoneksi dengan jaringan Mikrotik dapat dimanage menggunakan WinBox
yang bisa di download dari Mikrotik.com atau dari server mikrotik kita.
Misal Ip address server
mikrotik kita 192.168.0.1, via browser buka 
http://192.168.0.1 dan download WinBox dari situ.
Jika kita menginginkan client mendapatkan IP address secara otomatis maka perlu kita setup dhcp server pada Mikrotik. Berikut langkah-langkahnya :
1.Buat IP address pool
/ip pool add name=dhcp-pool ranges=172.16.0.10-172.16.0.20
2. Tambahkan DHCP Network dan gatewaynya yang akan didistribusikan ke client Pada contoh ini networknya adalah 172.16.0.0/24 dan gatewaynya 172.16.0.1
/ip dhcp-server network add address=172.16.0.0/24 gateway=172.16.0.1
3. Tambahkan DHCP Server ( pada contoh ini dhcp diterapkan pada interface ether2 )
/ip dhcp-server add interface=ether2 address-pool=dhcp-pool
4. Lihat status DHCP server
[admin@XAVIERO]> ip dhcp-server print
Flags: X – disabled, I – invalid
# NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP
0 X dhcp1 ether2
Tanda X menyatakan bahwa DHCP server belum enable maka perlu dienablekan terlebih dahulu pada langkah 5.
5. Jangan Lupa dibuat enable dulu dhcp servernya
/ip dhcp-server enable 0
kemudian cek kembali dhcp-server seperti langkah 4, jika tanda X sudah tidak ada berarti sudah aktif.
6. Tes Dari client
c:\>ping 
www.yahoo.com
untuk bandwith controller, bisa dengan sistem simple queue ataupun bisa dengan mangle
[admin@XAVIERO] queue simple> add name=Komputer01
interface=ether2 target-address=172.16.0.1/24 max-limit=65536/131072
[admin@XAVIERO] queue simple> add name=Komputer02
interface=ether2 target-address=172.16.0.2/24 max-limit=65536/131072
dan seterusnya…

Perintah Dasar Berbasis Teks (Bash Script)

Berikut perintah-perintahnya :
#any_command –help
Menampilkan keterangan bantu tentang pemakaian perintah. “–help” sama dengan perintah pada DOS “/h”.
#sudo
SuperUser Do, mendapatkan akses root atau administrator pada user biasa tanpa harus login sebagai root user
#ls
Melihat isi file dari direktori aktif. Pada linux perintah dir hanya berupa alias dari perintah ls. Untuk perintah ls sendiri sering dibuatkan alias ls –color, agar pada waktu di ls ditampilkan warna-warna sesuai dengan file-filenya, biasanya hijau untuk execute, dsb.
#ls -al
Melihat seluruh isi file pada direktori aktif beserta file hidden, lalu ditampilkan layar per layar.
#cd directory
Change directory. 
Menggunakan cd tanpa nama direktori akan menghantarkan anda ke home direktori. Dan cd – akan menghantarkan anda ke direktori sebelumnya.
#cp /source /destination
Mengopi suatu file, gunakan cp -r untuk copy suatu directory
#mcopy /source /destination
Mengcopy suatu file dari/ke dos filesystem.
Contoh mcopy a:autoexec.bat ~/junk . Gunakan man mtools untuk command yang sejenis : mdir, mcd, mren, mmove, mdel, mmd, mrd, mformat….
#mv /source /destination
Memindahkan atau mengganti nama file
ln -s source destination Membuat Simbolic Links, contoh ln -sf /usr/X11R6/bin/XF86_SVGA /etc/X11/X, membuat Simbolic link dari file XF86_SVGA ke X
#rm /files
Menghapus file
#mkdir /directory
Membuat direktori baru
#rmdir /directory
Menghapus direktori yang telah kosong
#rm -r /files
(recursive remove) Menghapus file, direktori dan subdirektorinya. Hati-hati menggunakan perintah ini apabila anda login sebagai root, karena root dengan mudah dapat menghapus seluruh file pada sistem dengan perintah di atas, tidak ada perintah untuk undelete di Linux
#more filename
Untuk melihat isi suatu file, dengan tambahan perintah more, maka isi file tersebut ditampilkan layar per layar.
#less filename
Melihat suatu file layar per layar, dan tekan tombol “q” apabila ingin keluar,
#pico filename
Edit suatu text file.
#pico -w filename
Edit suatu text file, dengan menonaktifkan fungsi word wrap, sangat berguna untuk mengedit file seperti /etc/fstab.
#lynx file.html
Melihat file html atau browse ke net dengan text mode, dimana gambar/image tidak dapat ditampilkan, tapi lynx adalah suatu browser yang sangat cepat, sangat berguna bila anda hanya menginginkan suatu artikel tanpa image.
#tar -zxvf filename.tar.gz
Meng-untar sebuah file tar sekaligus meng-uncompress file tersebut (*.tar.gz atau *.tgz), untuk meletakkannya direktori yg diinginkan tambahkan option -C direktori, contoh tar -zxvf filename.tar.gz -C /opt (meletakkan file tersebut di direktori /opt
#tar -xvf filename.tar
Meng-untar sebuah file tar yang tidak terkompress (*.tar).
#gunzip filename.gz
Meng-uncompress sebuah file zip (*.gz” or *.z). dengan menggunakan gzip (juga zip atau compress) jika anda menginginkan mengompress file.
#bunzip2 filename.bz2
Meng-uncompress file dengan format (*.bz2) dengan utiliti “bzip2?, digunakan pada file yang besar.
#unzip filename.zip
Meng-uncompress file dengan format (*.zip) dengan utiliti “unzip” yang kompatibel dengan pkzip for DOS.
#find / -name “filename”
Mencari “filename” pada komputer anda dimulai dengan direktori /. Namafile tersebut mungkin saja berisi wildcard (*,?).
                         
#locate filename
Mencari file dengan string “filename”. Sangat mudah dan cepat dari perintah di atas.

#talk username1
Berbicara dengan keyboard dengan user lain yg sedang login pada mesin kita (atau gunakan talk username1@machinename untuk berbicara dengan komputer lain). Untuk menerima undangan percakapan, ketikkan talk username2. Jika seseorang mencoba untuk berbicara dengan anda dan itu dirasakan mengganggu, anda bisa menggunakan perintah mesg n untuk menolak pesan tersebut. Dan gunakan perintah who atau rwho untuk melihat siapa user yang mengganggu tersebut.

#mc“Midnight Commander” sebagai file manager, cepat dan bagus.
#telnet server
Untuk menghubungkan komputer kita ke komputer lain dengan menggunakan protokol TELNET. Gunakan nama mesin atau Nomor IP mesin, dan anda akan mendapatkan prompt login name dari mesin tersebut, masukkan passwordnya, oh ya .. anda juga harus punya account di mesin remote tersebut. Telnet akan menghubungkan anda dengan komputer lain dan membiarkan anda untuk mengoperasikan mesin tersebut.
Telnet sangat tidak aman, setiap yang anda ketik menjadi “open text”, juga dengan password anda! Gunakan ssh alih-alih telnet untuk mengakses mesin secara remote.
#ssh user@ipaddress
(Secure Shell) Untuk mengakses mesin lain,
#rlogin user@ipaddress
(remote login) Menghubungkan anda kekomputer lain. Loginname dan password, tetapi apabila account anda tersebut telah dipakai, maka anda akan mendapatkan pesan kesalahan pada password anda. Sangat tidak aman juga, gunakan ssh sebagai gantinya.
#rsh user@ipaddress
(remote shell) Jalan lain untuk menghubungkan anda ke remote machine. Apabila login name/password anda sedang dipakai di remote mesin tsb, maka password anda tidak akan berlaku. Idem dengan rlogin, gantikan dengan ssh.
#ftp user@ipaddress
Ftp ke mesin lain, ini sangat berguna untuk mengopy file ke/dari remote mesin. Juga tidak aman, gunakan scp dari keluarga ssh sebagai gantinya.
#scp /source /destination
(secure copy) untuk copy file ke atau dari mesin lain, contoh scp user@ipaddress:/source /destination
minicom Program Minicom (dapat dikatakan seperti “Procomm/Hyperterminal for Linux”).
#./program_name
Menjalankan program pada direktori aktif, yang mana tidak terdapat pada PATH anda
#xinit
Menjalankan X-window server (tanpa windows manager).
#startx
Menjalankan X-window server dan meload default windows manager. Sama seperti perintah “win” under DOS dengan Win3.1
#startx — :1
Menjalankan sesi X-windows berikutnya pada display 1 (default menggunakan display 0). Anda dapat menjalankan banyak GUI terminal secara bersamaan, untuk pindah antar GUI gunakan , , etc, tapi ini akan lebih banyak memakan memori.
#xterm
(pada X terminal) ,menjalankan X-windows terminal. Untuk keluar ketikkan exit
#xboing
(pada X terminal). Sangat lucu deh …., seperti games-games lama …..
gimp (pada X terminal) Program image editor yang sangat bagus, bisa disamakan dengan Adobe Photoshop, yang membedakan adalah program ini gratis.
#netscape
(pada X terminal) menjalankan netscape, versi pada waktu tulisan ini dibuat telah mencapai versi 4.7
netscape -display host:0.0 (pada X terminal) menjalankan netscape pada mesin yang aktif dan menampilkan outputnya pada mesin yang bernama host display 0 screen 0.
Anda harus memberikan akses untuk mesin aktif untuk menampilkannya pada mesin host dengan perintah xhost
#shutdown -h now
(sebagai root) Shut down sistem. Umumnya digunakan untuk remote shutdown. Gunakan untuk shutdown pada konsol (dapat dijalankan oleh user).
#halt
reboot (sebagai root) Halt atau reboot mesin. 
Lebih simple dari perintah di atas.
#man topic
Menampilkan daftar dari sistem manual pages (help) sesuaidengan topic. Coba man man. lalu tekan q untuk keluar dari viewer. 
Perintah info topic Manual pages dapat dibaca dilhat dengan cara any_command –help.
#apropos topic
Menampilkan bantuan manual berdasarkan topik..
#pwd
Melihat direktori kerja saat ini
#hostname
Menampilkan nama local host (mesin dimana anda sedang bekerja). Gunakan perintah netconf (sebagai root) untuk merubah nama host dari mesin tersebut, atau edit file /etc/hosts
#whoami
Mencetak login name anda
#id username
Mencetak user id (uid) atau group id (gid)
#date
Mencetak atau merubah tanggal dan waktu pada komputer, contoh merubah tanggal dan waktu ke 2000-12-31 23:57 dengan perintah: date 123123572000
#time
Melihat jumlah waktu yg ditangani untuk penyelesaian suatu proses + info lainnya. Jangan dibingungkan dengan perintah date
who Melihat user yang login pada komputer kita.
#rwho -a
Melihat semua user yg login pada network anda. 
Layanan perintah rwho ini harus diaktifkan, jalankan setup sebagai root untuk mengaktifkannya.
#finger username
Melihat informasi user, coba jalankan; finger root
#last
Melihat user sebelumnya yang telah login di komputer.
#uptime
Melihat jumlah waktu pemakaian komputer oleh seseorang, terhitung proses reboot terakhir.
#ps
(=print status) Melihat proses-proses yang dijalankan oleh user
#ps aux
Melihat seluruh proses yang dijalankan, walaupun tanpa terminal
#uname -a
Informasi system kernel anda
#freeInformasi memory (dalam kilobytes).
#df -h
(=disk free) Melihat informasi pemakaian disk pada seluruh system (in human-readable form)
#du / -bh
(=disk usage) Melihat secara detil pemakaian disk untuk setiap direktori, dimulai dari root (in human legible form).
#cat /proc/cpuinfo
Cpu info. 
Melihat file pada /proc directori yang bukan merupakan file nyata (not real files).
#cat /proc/interrupts
Melihat alamat interrupt yang dipakai.
#cat /proc/version
Melihat Versi dari Linux dan informasi lainnya.
#cat /proc/filesystems
Melihat filesystem yang digunakan.
#cat /etc/printcap
Melihat printer yang telah disetup
#lsmod (as root)
Melihat module-module kernel yang telah di load.

vi

What is vi?

The default editor that comes with the UNIX operating system is called vi (visual editor). [Alternate editors for UNIX environments include pico and emacs, a product of GNU.]
The UNIX vi editor is a full screen editor and has two modes of operation:
  1. Command mode commands which cause action to be taken on the file, and
  2. Insert mode in which entered text is inserted into the file.
In the command mode, every character typed is a command that does something to the text file being edited; a character typed in the command mode may even cause the vi editor to enter the insert mode. In the insert mode, every character typed is added to the text in the file; pressing the <Esc> (Escape) key turns off the Insert mode.
While there are a number of vi commands, just a handful of these is usually sufficient for beginning vi users. To assist such users, this Web page contains a sampling of basic vi commands. The most basic and useful commands are marked with an asterisk (* or star) in the tables below. With practice, these commands should become automatic.
NOTE: Both UNIX and vi are case-sensitive. Be sure not to use a capital letter in place of a lowercase letter; the results will not be what you expect.



To Get Into and Out Of vi


To Start vi


To use vi on a file, type in vi filename. If the file named filename exists, then the first page (or screen) of the file will be displayed; if the file does not exist, then an empty file and screen are created into which you may enter text.

*vi filenameedit filename starting at line 1
 vi -r filenamerecover filename that was being edited when system crashed

To Exit vi


Usually the new or modified file is saved when you leave vi. However, it is also possible to quit vi without saving the file.
Note: The cursor moves to bottom of screen whenever a colon (:) is typed. This type of command is completed by hitting the <Return> (or <Enter>) key.

*:x<Return>quit vi, writing out modified file to file named in original invocation
 :wq<Return>quit vi, writing out modified file to file named in original invocation
 :q<Return>quit (or exit) vi
*:q!<Return>quit vi even though latest changes have not been saved for this vi call



Moving the Cursor


Unlike many of the PC and MacIntosh editors, the mouse does not move the cursor within the vi editor screen (or window). You must use the the key commands listed below. On some UNIX platforms, the arrow keys may be used as well; however, since vi was designed with the Qwerty keyboard (containing no arrow keys) in mind, the arrow keys sometimes produce strange effects in vi and should be avoided.
If you go back and forth between a PC environment and a UNIX environment, you may find that this dissimilarity in methods for cursor movement is the most frustrating difference between the two.
In the table below, the symbol ^ before a letter means that the <Ctrl> key should be held down while the letter key is pressed.

*j or <Return>
  [or down-arrow]
move cursor down one line
*k [or up-arrow]move cursor up one line
*h or <Backspace>
  [or left-arrow]
move cursor left one character
*l or <Space>
  [or right-arrow]
move cursor right one character
*0 (zero)move cursor to start of current line (the one with the cursor)
*$move cursor to end of current line
 wmove cursor to beginning of next word
 bmove cursor back to beginning of preceding word
 :0<Return> or 1Gmove cursor to first line in file
 :n<Return> or nGmove cursor to line n
 :$<Return> or Gmove cursor to last line in file



Screen Manipulation


The following commands allow the vi editor screen (or window) to move up or down several lines and to be refreshed.

 ^fmove forward one screen
 ^bmove backward one screen
 ^dmove down (forward) one half screen
 ^umove up (back) one half screen
 ^lredraws the screen
 ^rredraws the screen, removing deleted lines



Adding, Changing, and Deleting Text


Unlike PC editors, you cannot replace or delete text by highlighting it with the mouse. Instead use the commands in the following tables.
Perhaps the most important command is the one that allows you to back up and undo your last action. Unfortunately, this command acts like a toggle, undoing and redoing your most recent action. You cannot go back more than one step.

*uUNDO WHATEVER YOU JUST DID; a simple toggle

The main purpose of an editor is to create, add, or modify text for a file.

Inserting or Adding Text


The following commands allow you to insert and add text. Each of these commands puts the vi editor into insert mode; thus, the <Esc> key must be pressed to terminate the entry of text and to put the vi editor back into command mode.
*iinsert text before cursor, until <Esc> hit
 Iinsert text at beginning of current line, until <Esc> hit
*aappend text after cursor, until <Esc> hit
 Aappend text to end of current line, until <Esc> hit
*oopen and put text in a new line below current line, until <Esc> hit
*Oopen and put text in a new line above current line, until <Esc> hit

Changing Text


The following commands allow you to modify text.
*rreplace single character under cursor (no <Esc> needed)
 Rreplace characters, starting with current cursor position, until <Esc> hit
 cwchange the current word with new text,
starting with the character under cursor, until <Esc> hit
 cNwchange N words beginning with character under cursor, until <Esc> hit;
  e.g., c5w changes 5 words
 Cchange (replace) the characters in the current line, until <Esc> hit
 ccchange (replace) the entire current line, stopping when <Esc> is hit
 Ncc or cNcchange (replace) the next N lines, starting with the current line,
stopping when <Esc> is hit

Deleting Text


The following commands allow you to delete text.
*xdelete single character under cursor
 Nxdelete N characters, starting with character under cursor
 dwdelete the single word beginning with character under cursor
 dNwdelete N words beginning with character under cursor;
  e.g., d5w deletes 5 words
 Ddelete the remainder of the line, starting with current cursor position
*dddelete entire current line
 Ndd or dNddelete N lines, beginning with the current line;
  e.g., 5dd deletes 5 lines

Cutting and Pasting Text


The following commands allow you to copy and paste text.
 yycopy (yank, cut) the current line into the buffer
 Nyy or yNycopy (yank, cut) the next N lines, including the current line, into the buffer
 pput (paste) the line(s) in the buffer into the text after the current line



Other Commands


Searching Text


A common occurrence in text editing is to replace one word or phase by another. To locate instances of particular sets of characters (or strings), use the following commands.
 /stringsearch forward for occurrence of string in text
 ?stringsearch backward for occurrence of string in text
 nmove to next occurrence of search string
 Nmove to next occurrence of search string in opposite direction

Determining Line Numbers


Being able to determine the line number of the current line or the total number of lines in the file being edited is sometimes useful.
 :.=returns line number of current line at bottom of screen
 :=returns the total number of lines at bottom of screen
 ^gprovides the current line number, along with the total number of lines,
in the file at the bottom of the screen



Saving and Reading Files

These commands permit you to input and output files other than the named file with which you are currently working.

 :r filename<Return>read file named filename and insert after current line
(the line with cursor)
 :w<Return>write current contents to file named in original vi call
 :w newfile<Return>write current contents to a new file named newfile
 :12,35w smallfile<Return>write the contents of the lines numbered 12 through 35 to a new file named smallfile
 :w! prevfile<Return>write current contents over a pre-existing file named prevfile
Pada zaman yang modern seperti saat ini siapa yang tidak mengenal sistem operasi yang berbasis Linux, mengingat sistem operasi ini free alias gratis sehingga banyak orang yang suka akan keberadaan Linux, selain itu juga tingkat keamanan Linux lebih secure/aman untuk digunakan dalam sebuah jaringan internet, tidak seperti sistem operasi wind*** sebagai contoh kecil saja adalah perbedaan pada portnya (pintu masuk), kalau pada wind*** port-port tersebut sudah otomatis terbuka tanpa user menginstalasinya terlebih dahulu, lain halnya pada linux port-port nya selalu tertutup dan akan terbuka seandainya user/admin sengaja membukanya, dengan demikian akan menyulitkan para peretas dunia maya/pentester jaringan untuk menembus port yang berbasis linux.

     
       Namun kesulitan yang sekarang dialami oleh para pemula penggguna linux akan disulitkan dengan berbagai macam perintah-perintah di linux yang sedikit asing dibandingkan pada command prompt, namun saya akan memberikan sedikit informasi tentang berbagai macam perintah dasar yang ada di linux, yang akan di paparkan di bawah :
>> Kumpulan & Daftar Perintah Linux + Penjelasan singkatnya Dari A – Y :

A
adduser = Tambah pengguna ke sistem
addgroup = Tambah grup ke sistem
alias = Buat sebuah alias
apropos = Cari Bantuan halaman manual (man-k)
apt-get = Cari dan menginstal paket perangkat lunak (Debian)
aspell = Pemeriksa Ejaan
awk = Cari dan Ganti teks, database sort / validate / index
B
basename = Strip direktori dan akhiran dari nama file
bash = GNU Bourne-Again Shell
bc = Arbitrary bahasa kalkulator presisi
bg = Kirim ke latar belakang
break = Keluar dari sebuah loop
builtin = Jalankan shell builtin
bzip2 = Compress atau dekompresi file bernama (s)
C
cal = Tampilkan kalender
case = kondisional melakukan perintah
cat = Menampilkan isi file
cd = Mengganti Directori
cfdisk = Tabel partisi manipulator untuk Linux
chgrp = Mengubah kepemilikan grup
chmod = Mengubah izin akses
chown = Mengubah pemilik file dan grup
chroot = Jalankan perintah dengan direktori root yang berbeda
chkconfig = Sistem layanan (runlevel)
cksum = Cetak byte CRC checksum dan menghitung
clear = Hapus layar terminal
cmp = Membandingkan dua file
comm = Bandingkan dua file diurutkan baris demi baris
command = Jalankan perintah – shell mengabaikan fungsi
continue = Resume iterasi berikutnya dari suatu loop
cp = Menyalin satu atau lebih file ke lokasi lain
cron = Daemon menjalankan perintah yang dijadwalkan
crontab = Jadwalkan perintah untuk menjalankan di lain waktu
csplit = Split file ke dalam konteks – potongan ditentukan
cut = membagi file menjadi beberapa bagian
D
date = Menampilkan atau mengubah tanggal & waktu
dc = Desk Kalkulator
dd = Mengkonversi dan menyalin file, menulis header disk, boot record
ddrescue = Alat untuk memperbaiki data
declare = Deklarasikan variabel dan memberi mereka atribut
df = Tampilkan ruang disk
diff = Tampilkan perbedaan antara dua file
diff3 = Tampilkan perbedaan di antara tiga file
menggali = DNS lookup
dir = Daftar isi direktori singkat
dircolors = Warna setup untuk `ls ‘
dirname = Convert semua pathname ke beberapa path
dirs = Tampilkan daftar direktori yang diingat
dmesg = Mencetak pesan-pesan kernel & driver
du = Perkiraan penggunaan kapasitas file
E
echo = Tampilkan pesan di layar
egrep = Cari file untuk baris yang sesuai dengan ekspresi yang diperpanjang
eject = Mengeluarkan media removable
enable = Mengaktifkan dan menonaktifkan perintah shell builtin
env = Environment variabel
ethtool = Pengaturan kartu Ethernet
eval = Evaluasi beberapa perintah / argumen
exec = Menjalankan perintah
exit = Keluar dari shell
expect = mengotomatiskan aplikasi yang bebas diakses melalui terminal
expand = Convert tab ke spasi
eksport = Set variabel lingkungan
expr = Evaluasi ekspresi
F
false = Tidak melakukan apa-apa, tidak berhasil
fdformat = Tingkat rendah format sebuah floppy disk
fdisk = tabel partisi manipulator untuk Linux
fg = Kirim pekerjaan untuk foreground
fgrep = Cari file untuk baris yang cocok dengan string yang tetap
file = Tentukan jenis file
find = Cari file yang memenuhi kriteria yang diinginkan
fmt = Format ulang tipe teks
fold = Wrap teks agar sesuai dengan lebar tertentu.
for = Memperluas kata-kata, dan menjalankan perintah
format = Format disk atau kaset
free = Tampilkan penggunaan memori
fsck = Memeriksa dan memperbaiki sistem File konsistensi
ftp = File Transfer Protocol
fungsi =  Tentukan fungsi macro
fuser = Identifikasi / memutuskan proses yang sedang mengakses file

gawk = Cari dan Ganti teks dalam file
getopts = Menguraikan parameter sesuai posisi
grep = Cari file untuk baris yang cocok dengan pola tertentu
group = Cetak nama grup pada pengguna
gzip = Compress atau dekompresi nama file
H
hash = Mengingat  seluruh pathname dari sebuah nama argumen
head = Output bagian pertama dari file
help = Tampilkan bantuan untuk perintah built-in
history = Perintah history
hostname = Cetak atau mengatur nama sistem
I
id = Cetak user dan grup id
if = melakukan perintah kondisional
ifconfig = Konfigurasi antarmuka jaringan
ifdown = Menghentikan antarmuka jaringan
ifup = Memulai antarmuka jaringan keatas
import = Menangkap layar server  X dan menyimpan sebuah gambar ke file
install = Menyalin file dan mengatur atribut
J
join = gabung garis pada field umum
K
kill = Memberhentikan proses yang sedang berjalan
killall = Memberhentikan proses oleh nama
L
less = Tampilan output satu layar pada satu waktu
let = Melakukan aritmatika pada variabel shell
ln = Membuat hubungan antara file
local = Membuat variabel
locate = Cari file
logname = Cetak nama login
logout = Keluar dari sebuah login shell
look = Tampilan baris yang dimulai dengan string tertentu
lpc = Program Kontrol  jalur printer
lpr = Off line print
lprint = Mencetak  file / Print file
lprintd = Abort pekerjaan print
lprintq = Daftar antrian print
lprm = Hapus pekerjaan dari antrian print
ls = List informasi tentang file
lsof  = List membuka file
M
make = Sekelompok Kompilasi ulang dari program
man = Bantuan manual
mkdir = Membuat folder baru
mkfifo = Membuat FIFOs (bernama pipa)
mkisofs = Buat hybrid ISO9660/JOLIET/HFS filesystem
mknod = Membuat blok atau karakter file khusus
more = Tampilan output satu layar pada satu waktu
mount  = Mount  file system
mtools = Memanipulasi file MS-DOS
mv = Memindahkan atau mengubah nama file atau direktori
mmv = Pindahkan massa dan mengubah nama (file)
N
netstat = Informasi Jaringan
nice = Mengatur prioritas perintah atau pekerjaan
nl = Nomor baris dan menulis file
nohup = Jalankan perintah kebal terhadap hangups
nslookup = Query Internet menyebut server secara interaktip
O
open = membuka file dalam aplikasi default
op = Operator akses
P
passwd Memodifikasi password user
paste = Menggabungkan baris file
pathchk  = Periksa nama file portabilitas
ping = Test sambungan jaringan
pkill = memberhentikan proses running
popd = Mengembalikan nilai sebelumnya dari direktori sekarang
pr  = Siapkan file untuk dicetak /print
printcap = kemampuan pencetak Database
printenv = Cetak variabel lingkungan
printf  = Format dan mencetak data
ps = Status Proses
pushd = Simpan dan kemudian mengubah direktori sekarang
pwd = Cetak direktori kerja
Q
quota = Tampikan penggunaan disk dan membatasinya
quotacheck  = Meneliti sistem file untuk penggunaan disk
quotactl = Set kuota disk
R
ram =  perangkat disk ram
rcp = Salin file antara dua mesin
read = Membaca baris dari standar input
readarray = Baca dari stdin ke variabel array
readonly  = Menandai variabel / fungsi sebagai readonly
reboot = Reboot sistem
rename = Ubah nama file
renice = Ubah prioritas dari proses yang berjalan
remsync = Sinkronisasi remote file melalui email
return = Keluar fungsi shell
rev = Membalikkan baris dari sebuah file
rm = Menghapus file
rmdir = Remove folder
rsync = Remote file copy (Synchronize file pohon)
S
screen = Multiplex terminal, run remote shells via ssh
scp = Secure copy (remote file copy)
sdiff  = Menggabungkan dua file secara interaktif
sed = Stream Editor
select = Menerima input keyboard
seq = Print urutan numeric
set = Memanipulasi variabel shell dan fungsi
sftp = Secure File Transfer Program
shift = Pergeseran parameter posisi
shopt = Pilihan shell
shutdown = Shutdown atau restart linux
sleep = Delay/penundaan untuk jangka waktu tertentu
slocate = Cari file
sort = Mengurutkan file teks
source = Jalankan perintah dari file `.”
split = Split file ke dalam fixed-potong
ssh = Secure Shell client (remote login program)
strace = Trace sistem panggilan dan sinyal
su = Gantikan identitas pengguna
sudo = Jalankan perintah sebagai user lain
sum = Mencetak checksum untuk file
symlink  = Buatlah nama baru untuk file
sync = Sinkronisasi data pada disk dengan memori
T
tail = Output bagian terakhir file
tar = Tape Archiver
tee = Redirect output ke beberapa file
test = Evaluasi ekspresi kondisional
time = Program Mengukur waktu running
times = User dan sistem waktu
touch = Ubah file timestamps
top = Daftar proses yang berjalan pada sistem
traceroute = Trace Route to Host
trap = Jalankan perintah ketika sebuah sinyal adalah set (Bourne)
tr = Translate, squeeze, dan / atau menghapus karakter
true = Tidak melakukan apapun, berhasil
tsort = Topologi sort
tty = Print filename dari terminal pada stdin
type = menjelaskan perintah
U
ulimit  = Batasi pengguna resources (sumber daya)
umask = Para pengguna menciptakan file tersembunyi
umount = Unmount (tidak menaiki) perangkat
unalias = Hapus alias
uname = Informasi sistem print
unexpand = Convert spasi untuk tab
Uniq = Uniquify file
unit = Mengkonversi unit dari satu skala ke yang lain
unset = Hapus variabel atau nama fungsi
unshar = Uraikan catatan arsip shell
until = Mengeksekusi perintah (sampai error)
useradd = Membuat akun user baru
usermod = Memodifikasi  akun user
users = Daftar para pengguna yang sekarang ini login
uuencode = Encode file biner
uudecode = Decode file yang dibuat oleh uuencod
V
v = Daftar isi direktori Verbosely ( `ls-l-b ‘)
vdir = Daftar isi direktori Verbosely ( `ls-l-b ‘)
vi = Text Editor
vmstat = Laporan statistik memori virtual
W
watch = Mengeksekusi / menampilkan sebuah program secara berkala
wc = Cetak byte, kata, dan baris menghitung
whereis = Cari pengguna $ path, halaman manual dan file source untuk program
which = Cari pengguna $ path untuk file program
while = Jalankan perintah
who = Cetak semua nama pengguna yang sedang log in
whoami = Cetak pengguna saat ini dan nama id ( `id-un ‘)
wget = Ambil halaman web atau file melalui HTTP, HTTPS atau FTP
write = Mengirim pesan ke pengguna lain
X
xargs = Jalankan utility, melewati daftar argumen yang dibangun 
Y
yes = Cetak string sampai di interrupt
.  = Skrip menjalankan perintah shell yang sekarang


Demikian perintah-perintah dasar yang ada pada linux.