Show Menu
Cheatography

Frequently used linux command

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Help

man
an interface to the on-line reference manuals
apropos
search the manual page names and descri­ptions (man -k)
whatis
display manual page descri­ptions (man -f)
info
read info documents
help
shell help
konqueror
browse man and info thanks to kio

Admini­str­ation

chroot
run command or intera­ctive shell with special root directory
su
change user id or become superuser
sudo
execute a command as another user
runcon
run command with specified security context (selinux)
chcon
change file security context (selinux)

Kernel

insmod
simple program to insert a module into the linux kernel
lsmod
program to show the status of modules in the linux kernel
modinfo
program to show inform­ation about a linux kernel module
modprobe
program to add and remove modules from the linux kernel
rmmod
simple program to remove a module from the linux kernel
depmod
program to generate module­s.dep and map files

System

uptime
view the system load and tell how long it has been running
uname
print system­/kernel inform­ation
arch
print machine hardware name (same as uname -m)
hostid
print the numeric identifier for the current host
lsb_re­lease
print distri­but­ion­-sp­ecific inform­ation
nproc
print the number of processing units available
free
display amount of free/u­sed­/swap memory in the system
vmstat
report virtual memory statistics
iostat
report central processing unit (cpu) statistics and input/­output statistics for devices, partitions and network filesy­stems (nfs)
mpstat
report processors related statistics
initctl
upstart service config­uration
start
init daemon control tool
stop
init daemon control tool
status
init daemon control tool
chkconfig
enable or disable system services
service
run a system v init script
sysv-r­c-conf
run-level config­uration for sysv like init script links
runlevel
output previous and current runlevel
telinit
change system runlevel
halt
reboot or stop the system
reboot
reboot or stop the system
shutdown
shutdown or restart the system
sysctl
configure kernel parameters at runtime