Cheatography
https://cheatography.com
A summary of useful Linux commands
This is a draft cheat sheet. It is a work in progress and is not finished yet.
Startup and Shutdown
shutdown -h now |
Shutdown the system now and do not reboot |
halt |
Stop all processes - same as above |
shutdown -r 5 |
Shutdown the system in 5 minutes and reboot |
shutdown -r now |
Shutdown the system now and reboot |
reboot |
Stop all processes and then reboot - same as above |
|
|
File System
mount |
Show all currently mounted devices |
mount -t iso9660 /dev/cdrom /mnt/cdrom |
Mount the device cdrom and call it cdrom under the /mnt directory |
mount -t msdos /dev/hdd /mnt/ddrive |
Mount hard disk “d” as a msdos file system and call it ddrive under the /mnt directory |
mount -t vfat /dev/hda1 /mnt/cdrive |
Mount hard disk “a” as a VFAT file system and call it cdrive under the /mnt directory |
mount -a |
Mount all devices listed in /etc/fstab |
umount /mnt/cdrom |
Unmount the cdrom |
du -hs /files |
Display the disk usage of the /files directory and all sub-directories |
du -hs /files/* |
Display the disk usage of all the sub-directories in /files |
df -h |
Display the file system disk usage in human readable format (i.e. 54M, 12G) |
|
|
|