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_release -a |
Full release info of any LSB distribution |
config file is /etc/lsb-release |
cat /etc/debian_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 |
User Management
id |
who |
last |
passwd <user> |
useradd <username> |
adduser |
usermod |
groupadd |
groupmod |
userdel |
passwd -e |
Force the user to change the password after login |
/etc/skel |
The configuration file which will be read when users are created |
|