Show Menu
Cheatography

Linux Cheat Sheet Cheat Sheet (DRAFT) by

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

System

uname -a
Get the kernel version
lsb_re­lease -a
Full release info of any LSB distri­bution
config file is /etc/l­sb-­release
cat /etc/d­ebi­an_­version
lists the debian version
uptime
How ling the system is up and running
hostname
host name of the system
hostname -i
ip address of the system
last reboot
last reboot info

Hardware Info

dmesg
hardware and boot messages
lsdev
lists all the devices
lsblk
lists all block devices
lsusb
lists all usb devices
lspci
lists all pci devices
lshw
lists all hardware
cat /proc/­cpuinfo
Lists the cpu model
cat /proc/­meminfo
Memory of the system
cat /proc/­meminfo | grep Mem
displays RAM
free -m
shows used RAM
cat /proc/­devices
lists all configured devices

Yum Package Management

 

Networking

 

DNS and DHCP

 

Apache2

 

Nginx

 

User Management

id
who
last
passwd <us­er>
useradd <us­ern­ame>
adduser
usermod
groupadd
groupmod
userdel
passwd -e
Force the user to change the password after login
/etc/skel
The config­uration file which will be read when users are created