May 03, 2017

Getting Around Your Server

We'll see some basic commands and how to find important information about your server.

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

All Topics