whereis [Prog] Search for a program
whereis eclipse
find . | grep [file]
Search for a file in the current
directory
find . | grep 123.txt
grep [KEYWORD] [file] Search for a keyword in a file
grep whatever 123.txt
locate [file] Locate file in a database
locate 123.txt
updatedb Update database
updatedb
which
Show, where the program is
placed
which eclipse
System
arch Processor family
arch
cat /proc/filesystems Supported filesystems
cat /proc/filesystems
cat /proc/cpuinfo Information about CPU
cat /proc/cpuinfo
dmesg | grep sd Information about all drives
dmesg | grep sd
date Date and time
date
dmesg
Kernel logger: shows Kernel
activities
dmesg
free Show usage of memory
free
kill [PID]
Kill the process with the
corresponding ID
kill 1067
killall [Prog] Kill process with the specific name
killall eclipse
lspci [options]
Information about the PCI
components (-v for detailed
output)
lspci -v
shutdown -h now Shutdown the PC
shutdown -h now
shutdown -r now Reboot the PC
shutdown -r now
top
Show program name and CPU
load
top
uptime Show the uptime of the PC
uptime
X -version Show the version of Xfree
X -version
Hard disk
df Show the disk space
df -h
fdisk Partition the hard disk
fdisk /dev/sda
mkfs.vfat Format the hard disk with vfat
mkfs.vfat /dev/sda1
mkfs.ext3 Format the hard disk with ext3
22 Appendix B. Linux commands
1966