Skip to content

Instantly share code, notes, and snippets.

@DominikSerafin
Last active December 21, 2017 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominikSerafin/1dc7a0ed99b4f051e5c98fae37115384 to your computer and use it in GitHub Desktop.
Save DominikSerafin/1dc7a0ed99b4f051e5c98fae37115384 to your computer and use it in GitHub Desktop.
Ubuntu Snippets

Resources

Bash

syslog in realtime tail -f /var/log/syslog

current dir pwd

monitor CPU usage, processes and RAM top

nicer monitor CPU usage, processes and RAM (needs package) htop

memory usage free -m

disk usage df -h

files & directories size du -h --max-depth=1 $PATH

repeat last command !!

top 10 commands used history | awk 'BEGIN {FS="[ \t]+|\\|"} {print $3}' | sort | uniq -c | sort -nr | head

see aliases alias

Nginx

link nginx config ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment