Belajar Linux: Command Line Cheatsheet Part. 2

Di bawah ini kelanjutan dari command line cheatsheet Part. 1.


System Commands

CommandDescription
uname -aShow system and kernel
head -n1 /etc/issueShow distribution
dateShow system date
uptimeShow system uptime
whoamiShow your username
wDisplay who is online
man commandShow manual for command
mountShow mounted filesystems
mount -o loop cdrom.iso /mnt/dirmount cdrom.iso at /mnt/dir
cat /proc/partitionsShow all partitions registered on the system
grep MemTotal /proc/meminfoShow RAM total seen by the system
grep "model name" /proc/cpuinfoShow CPU(s) info lspci -tv - Show PCI info
lsusb -tvShow USB info
!!Repeat the last command
exitLog out of current session

Process Management

CommandDescription
psShow snapshot of processes
topShow real time processes
kill pidKill process with id pid
pkill nameKill process with name name
killall nameKill all processes with names beginning name

Keyboard Shortcuts

CommandDescription
Ctrl + Shift + cCopy a highlighted text
Ctrl + cStop current command
Ctrl + Shift + vPaste a copied text
Ctrl + rStart a search
Ctrl + uCut from start of line
Ctrl + zSleep program
Ctrl + kCut to end of line
Ctrl + aGo to start of line
Ctrl + eGo to end of line

Baca Juga:  Network Multihoming di Linux (RHEL 5.3)

SSH

CommandDescription
ssh $USER@$HOSTConnect to $Host as $USER
ssh $USER@$HOST commandRun command on $HOST as $USER
ssh $USER@$HOST -p 1234Connect to $HOST as $USER on port 1234
scp file1 $USER@$HOST:file1Secure copy file1 from local machine to file1 at remote $HOST
scp $USER@$HOST:file1 file1Secure copy file1 from remote $HOST to file1 at local machine
scp -r foo $USER@$HOST:/barSecure copy the folder foo from local machine to the folder bar at remote $HOST

Package Installation

CommandDescription
dpkg -i package.debInstall a deb package
rpm -Uvh package.rpmInstall a rpm package

Disk Space

CommandDescription
df -hShow free space on mounted filesystems
df -iShow free inodes on mounted filesystems
du -h folderShow file usage of each folder in folder
du -sh folderShow the total file size of folder
fdisk -lShow disks partitions sizes and types (run as root)
freeShow memory and swap usage

 

About This Author

IT Engineer, Red Hat Certified System Administrator & Technician (RHCT & RHCSA), Certified Data Center Facilities Operation Manager (CDFOM), Certified Ethical Hacking (CEH), expert in Computer Networking in multi operating system and hardware. Specialties: Linux, Free BSD, *Nix, MS Windows, Data Center, Cisco & Computer Networking

Post A Reply