Redo last command but as root

sudo !!

open an editor to run a command


Create a super-fast ram disk

mkdir -p /mnt/ram
mount -t tmpfs tmpfs /mnt/ram -o size=8192M

Don’t add a command to history (note the leading space)

 ls -l

fix a really long command that you messed up


tunnel with ssh (local port 3337 -> remote host’s on port 6379)

ssh -L 3337: -N

quickly create folders

mkdir -p folder/{sub1,sub2}/{sub1,sub2,sub3}

intercept stdout and log to file

cat file | tee -a log | cat > /dev/null

exit terminal but leave all processes running

disown -a && exit

Leave a Reply