Now that you have a virtual server setup, you can enjoy the benefits of managing your server as root (super admin). With root level access, you can send commands to your server using a bash terminal. Here are the common commands:
- man – stands for manual. Very useful command if you are just getting started with Linux. You can invoke ‘man’, followed by any other Linux command (cd, for example) and it will display detailed description and list of all available options.
- cd – cd is short for ‘change directory’. Allows browsing between different folders of your VPS.
- cp, mv, rm – great commands for basic file management. You can copy (cp), move (mv) or remove (rm) files/folders this way from your server.
- grep – grep permits you to print lines that match a particular pattern. Useful if you are looking for a phrase or or line in a large text file (logs, for example).
- ls – allows you to list the content of a directory. Using “ls -la” will also show you hidden files/directories (those starting with a dot) and additional attributes, such as permissions and ownership.
- chown, chmod – every file or directory has its own ownerhip rights – user and group. With “chown” you can modify those parameters and “chmod” gives you the ability to change permissions (read, write, execute) for the owner, group and the rest of the users, accessing that file/directory.
- nano, vi – “nano” and “vi” are probably the two most popular Linux text editors. You may find “nano” easier to use, while “vi” appears as the preferred editor among more experienced.
- top, ps – “top” provides you with a periodic update (every five seconds by defaut) of running Linux tasks, while “ps” takes a snapshot of all current processes and prints it on your screen.
- df -h, du -hs – shows you the current overall use of your disk in gygabytes (df -h).”du -hs” calculates the total size of a directory in a human readable format (e.g., 1K 234M 2G).
Here are two bonus commands for checking DESK SPACE and RAM usages:
To check out the disk space usage on your server, execute this command:
And to see the memory usage: