In this tutorial, you will going to show you best useful SSH command line(CLI) for Magento 2.
SSH, also known as Secure Socket Shell, is a network protocol that provides administrators with a secure way to access a remote computer.. To connect to your server from your pc you can use Putty and type simple SSH commands to perform different actions like create folders, copying and so on.
Here you can find the complete list of ssh commands for you.
1) Show present working directory
pwd command is used to see where on the server you are.
2) Change directory
cd command is used to navigate into a specified directory on your server.
cd /home(moves you into the home folder)
3) Same directory
cd . command is used to you will remain in the same directory you were.
4) Move me up one directory
cd .. command is used to navigate two steps back from current directory.
5) Go to the previous directory
cd – command is used to navigate to the previous directory.
6) Go to Home folder
cd ~ command is used to navigate to the home directory on your server.
7) Go to root
cd / command is used to navigate to root.
8) List of all files
ls command is used to display all content in a folder.
ls /home.(will return all content of the folder /home)
ls /home/public_html.(will return all content of the folder /home/public_html)
9) Show all files in a directory
ls -a command is used to display all files in a directory.
10) Show contents with file size
ls -h command is used to show contents with file size.
11) How to list sub-directories recursively
ls -h command is used to list sub-directories recursively.
12) How to see files by file size
ls -is command is used to list files by size.
Hope this is useful for you 🙂