Here Are Some Must Know GNU/Linux Commands For the SSH Users Who Are Relatively Newer and Primarily Managing Own Servers to Run their Websites. Obviously, they are System Admin; but we guess they need some kind help! Usually we use Nginx, PHP5-FPM, MariaDB/MySQL setup (or LEMP setup) to run WordPress, so basically you need not know huge number of commands at the beginning. Also there are some tools based on text based user interface, they can help the new users. We are not discussing that part.
Must Know GNU/Linux Commands For the SSH Users
First we do SSH. The command format for private key based SSH authentication system is :
1 | ssh -i /path/to/key.pem username@server_ip |
if we add a -v
flag, then it gives lot of information to us :
---
1 | ssh -v -i /path/to/key.pem username@server_ip |
Second, we need to know to basic navigation commands, we are taking that ls
, pwd
, rm
etc. commands are known to the reader. cat
becomes the second important command as without touching a file we can check the content of the file. For example :
1 | cat /etc/nginx/sites-available/default |
if we add -n
flag, we’ll get the line numbers too :
1 | cat -n /etc/nginx/sites-available/default |
Next is tar and untar. Suppose we wget-ed latest version of WordPress, then we untar in this way :
1 | tar -xzvf latest.tar.gz |
As for first clean installation, there is no directory on the FTP root, we make it shorter :
1 | tar -xzvf l* |
We can tar the extracted wordpress
directory to latest named tar ball in this way :
1 2 3 | # first remove any same named stuff rm -r latest.tar.gz tar -cvzf latest.tar.gz /path/to/wordpress |
We can even extract tar ball with a progress bar.
cURL is very important tool. We can easily check the headers with cURL in this way :
1 | curl -I https://thecustomizewindows.com |
Other important commands has been discussed throughout this website, including grep, unix pipe, awk etc. most commonly used tools and commands.