Skip to content

Instantly share code, notes, and snippets.

@johnantoni
Created April 28, 2009 19:35
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 johnantoni/103339 to your computer and use it in GitHub Desktop.
Save johnantoni/103339 to your computer and use it in GitHub Desktop.
who ..users logged in and what they're doing
users ..users logged in
last ..users who have logged in / out + when last rebooted
lastlog ..does the same but lists as log
whoami ..who you're logged in as
sudo passwd [user] ..change users password
nano [file] ..nice text editor
gedit . ..open current dir in gnome editor (note the . )
cat /proc/cpuinfo ..show cpu info
free -tm ..shows memory free in mb
top ..memory usage
uname -options ..show o/s info
dmesg ..debug info
chown [user] file/folder ..change file/folder ownership
which [program] ..find location of program
sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude clean
sudo aptitude install [package]
sudo aptitude remove [package]
crontab -e ...cron records
crontab -i ...test cron records
visudo ...setup user rights
..start task on reboot without email reporting
@reboot (sh /startup.sh) > /dev/null 2>&1
poweroff ..shutdown machine
shutdown -r now ..reboot machine
rm -rf [dir] ...remove directory recursively
ls -a ..show files / dirs inc. hidden files
ls -l ..show file / dir permissions & sizes
ssh-keygen ..generate rsa key
ssh-keygen -d ..generate dsa key
ssh-keygen -f mykey ..generate named rsa key
chmod -R a+rw public ..make [public] public recursively
lspci | grep VGA ..show video hardware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment