Linux Cheat Sheet

From WikiOD

Here is the cheatsheat of Linux and basic guide on how to use Linux

Mounting a RAM drive[edit | edit source]

$ mount -t tmpfs -o size=5G,nr_inodes=5k,mode=700 tmpfs /tmp

Visudo[edit | edit source]

sudo visudo

username ALL=(ALL) NOPASSWD:/sbin/restart whatever

Display the amount of available disk space[edit | edit source]

df
df -h   # human-readable format
df -a   # all filesystems

Display disk usage[edit | edit source]

du
du -hsx * | sort -rh | head -10    # largest 10 folders

Answer yes in a bash script[edit | edit source]

yes | /your/command

Credit:rstacruz