Getting Around Your Server

May 03, 2017

Length: 09:56

We explore the system a bit and see what common commands you might want to use.

Commands we cover:

  • pwd: print working directory (the current directory you are in)
  • cd - move working directory
    • cd ~ or cd - Move to current user home directory
    • cd - Go to the previous directory you were in
  • history - search command history
    • history | grep TERM - Search for a specific command run
    • !48 - History returns a numbered list. Use !<command number> to re-run that command
  • lsb_release -a - Find system information on Debian/Ubuntu
  • uname -r, uname -i - Get linux information (linux kernel version, 32 vs 64 bit, etc)
  • ps aux - List all runningprocesses and information about them
    • ps aux | grep TERM - Search for a process by a search term (e.g. php, nginx)
  • top - See currently running processes and resource usage
    • htop - A much nicer view of the top command, includers filters and other tools
  • df -h - See disk usage information
  • free -m - See RAM and Swap usage