A Basic Introduction to the Linux Command Line

If you are managing a Linux server for the first time, you are probably using a web-based control panel, such as cPanel/WHM.  While a control panel may fill most of your basic needs as a system administrator, there are some tasks best left to the command line. On a remote Linux server, you can access the command line via SSH.

Some Basic Tips

  1. $ – this symbol at the command prompt means you are logged in as a normal user with limited privileges.
  2. # – indicates you are logged in as root and have full system privileges
  3. ~ – tells you that you are within the local user’s home directory. For example “user@locahost:~/webs” would refer to the “webs” directory in the user’s home directory tree.
  4. / – the highest (or root) directory in the file system. Every path, even separate partitions on your hard drive, will fall under “/”.
  5. Ctrl+C – cancels a command in progress
  6. Ctrl+Z – stop user interaction with a command without terminating it (returns you to the command prompt)
  7. Up Arrow key – used to browse through command history (Type history for a full list)
  8. ls – lists all files in the current directory
  9. rm – removes the specified file (i.e. rm filename.txt)
  10. cp – copies files from one destination to another
  11. cd – change directory. Examples:
    cd subdirectory – changes to a sub directory within the current one
    cd .. – moves you up one directory
    cd / – moves you to the root filesystem directory










Comments: