25 November 2011

Perinta-perintah dasar Linux

sedikit perintah-perintah yang biasa di gunakan di mesin linux:


grep “license” readme.txt = mencari kata “license” dalam file readme.txt
du -h –max-depth=100 = estimate file usage
du /media/data/ –max-depth=1 -B M | sort –g = melihat penggunaan space pada folder
du -sh /media/data/ = melihat besaran (MB) folder
sudo fdisk -l = show partition table
free = melihat free RAM
cat /etc/fstab = static file system information
cat /proc/cpuinfo = info cpu
cat /proc/meminfo = info memory
cat /proc/partitions = info partition
cat /etc/rc.d/rc.s = startup
find / -name “namafile” = search nama file
find /media/data/ -name “Thumbs.db” -print0 | xargs -0 rm -vr = menghapus hasil pencarian
find /home/user -size +30M = mencari file dengan ukuran diatas 30M alias lihat=’ls -l’ = memberikan alias perintah
cal 2010 = show calender
clear = clear the terminal screen
sudo shutdown -h now = menshutdown pc sekarang
sudo shutdown -h +2 = menshutdown pc
init 0 = halt
init 6 = reboot
init 2 =
top -d 2 = melihat proses shift+?
who = Show who is logged on
w = Show who is logged on and what they are doing
dmesg = print message system
cfdisk = tool tabel manipulator for linux
killall sshd = mengkill proses ssh
arp -ne = cek arp tabel
pstree = melihat proses secara pohon kebutuhan
lspci -v = cek hardware via konsole
lshw -C processor = cek hardware processor
sudo pmi action sleep = menjalankan fungsi sleep
sudo pmi action suspend = menjalankan fungsi suspend
dig 192.168.1.1 = dns lookup utility
cat /proc/net/arp = cek arp
sudo gedit /etc/fstab = file konfigurasi mount hardisk
scp test.log oniichan@192.168.1.12:~ = transfer file via jaringan kedalam home direktori
iwlist eth1 scanning = scanning access point
sudo ifconfig eth1 hw ether 0013022e91c7 = mengganti mac address
sudo apt-get -d source avant-window-navigator-bzr = download paket only, not install
sudo dpkg-reconfigure xserver-xorg = reconfigure ulang xserver
sudo /etc/init.d/gdm stop = mematikan service gdm stop
sudo iwconfig eth1 essid “pptik01″ = mendaftarkan name access point
sudo dhclient = auto dhcp
chown oniichan:oniichan /media/data = mengubah owner folder
sudo adduser nama_user nama_group = menambah user
usermod -G namagroup namauser = memasukkan user ke group
cat /etc/group = cek group user
smbclient -U% -L localhost = cek samba di local
cat /proc/version = cek version linux header
mtr http://www.hacker-newbie.org = gabungan ping dan traceroute
ls var/cache/apt/archives/ = data paket apt
ls /etc/rc2.d/ = list service
sudo update-rc.d -f rsync remove = meremove service rsync
sudo update-rc.d rsync defaults = mengadd service menjadi default service
ls -h = list human readeable
sudo apt-get install -f = fix dependency broken
cat /proc/acpi/acer/wireless = melihat penggunaan button
sudo tail -f /var/log/cups/error_log = melihat error pada service cups
lshal = melihat hal daemon usb
sudo hald = mengaktifkan hald daemon
sudo /etc/init.d/dbus start = service dbus daemon
nmap -sP 192.168.1.10-30 = checking ip up or not
watch lsusb = execute a program periodically
speaker-test 1.0.12 = test sound
wget http://cdn.x.indowebster.com/download/60…15054b.mp3 -O a.mp3 = download dan me-rename file
wget -c -t inf http://www3.indowebster.com/591803763.avi = download dengan opsi continous, try infinite jika gagal
wget -i download.txt = download dengan opsi membaca url dari file download.txt
wget –limit-rate=10k = download dengan opsi bandwith hanya 10 kilobytes/s
displayconfig-gtk = screen and grafik configurations
aplay -l = playing file
lsb_release -a = cek ubuntu version
lpinfo -v = cek printer
id = Print user and group information for the specified USERNAME
ps ax | grep screenlets | awk ‘{print$1}’ | xargs kill -9 = kill spesifik berdasarkan nama proses
file nama_file = Determine file type of FILEs
for i in {1..10}; do echo $i; done = ngurut nomer
update-manager -d = Check if upgrading to the latest devel release is possible
cat /etc/passwd | grep 1000 | awk -F: ‘{ print $1 }’ = menampilkan user dengan UID 1000
find debian/ -iname ‘*’ -print0 | xargs -0 md5sum > md5sum = creating md5sum
espeak -s 80 “I love you” = text to speech
apt-cache policy ubuntu-desktop = print policy settings
sudo ip route replace default nexthop via 192.168.0.1 dev eth0 weight 3 nexthop 192.168.1.1 dev eth1 weight 2 = load balancing
sudo Xorg -configure :1 = print konfigurasi xorg.conf
for FILE in cd*.bin ; do bchunk $FILE ${FILE%.*}.cue ${FILE%.*} ; done = mengubah file bin menjadi cue
rm cd[1-5].@(bin|cue) = menghapus secara spesifik
ls -l | awk ‘{print $8}’ = print secara list index
split -b 200MB avatar.avi avatar.avi. = split file into separate file
cat avatar.avi.* > avatar.avi = merge into 1 file
sudo ifup eth0 = Stop a network interface
sudo ifdown eth0 = Start a network interface up
wc -ml /etc/apt/sources.list = Print byte, word, and line counts
history = Command History
netstat = Networking information
cd x atau cd /x = masuk ke direktori x
cd .. atau cd ../ atau cd/.. = pindah ke direktori satu level di bawah
x lalu [tab] [tab] = berguna untuk mengetahui perintah apa saja yang tersedia yang berawalan huruf x
adduser = untuk menambahkan user baru
ls atau dir = untuk melihat isi suatu direktori
cat = untuk melihat isi dari suatu file text
mv x y = untuk memindahkan atau merename file x ke file y
cp x y = untuk mengkopi file x ke file y
rm x = untuk menghapus file x
mkdir x = untuk membuat direktori x
rmdir x = untuk menghapus direktori x
rm -r x = untuk menghapus direktori x beserta seluruh isinya
rm p = untuk menghapus paket tertentu
df atau df x = untuk mengetahui space kosong dalam device x
top = untuk mengetahui status memori (tekan q untuk quit)
man x = untuk mengetahui keterangan manual dari suatu perintah
less x = untuk melihat isi dari suatu file text
echo x = untuk mencetak isi dari suatu file x ke screen
mc = untuk menghidupkan Norton Commander dalam Linux (sangat berguna dan memudahkan bagi newbie)
mount = untuk menghidupkan suatu device spt cdrom
halt = untuk shutdown
reboot atau [ctl + alt + del] = untuk reboot
chmod = untuk mengubah permission suatu file
ls -l x = untuk melihat isi suatu direktori secara rinci
ln -s x y = untuk membuat link dari suatu file x ke file y
find x -name y -print = untuk menemukan file y, dengan mencari mulai dari direktori x dan tampilkan hasilnya pada layar
ps = untuk melihat seluruh proses yang sedang berjalan
kill x = untuk mematikan proses x (x adalah PID di dalam ps)
[alt] + F1 – F7 = untuk berpindah dari terminal 1 – 7 (ciri khas Linux)
lilo = untuk membuat boot disk
startx = untuk menjalankan X-Windows
[ctl] + [alt] + [backspace] = untuk keluar dari X-Windows jika terjadi trouble
[ctl] + [alt] + F1 – F6 = untuk pindah dari satu terminal ke terminal lain dalam X-Windows
xf86Config = untuk mengeset X (primitif) dalam text mode
Xconfigurator = sama seperti di atas
 sekian semoga bermanfaat bagi anda.

Tidak ada komentar:

Posting Komentar