We decided to compile basic SSH commands for the convenience of our readers and clients. You can handle VPS and Server SSH with these commands. This list of SSH commands will make your life easy.
If you want to know how to access your server through your Windows OS with the help of PuTTY, you can read this.
PuTTY Installation Guide
1. ls Command
The Command ls shows us a list of directories and files from the server. This command will help you to take a look at directories and files. You can see the following results after you type ls and press Enter in Linux on the screen.
These are some additional commands. You can use these commands to see more detailed information about files and directories.
-l — Will show you vital information like file size , creation date, owner as well as permissions.
-a — With this command, you will able to explore hidden files and directory on your server and VPS
After you saw your directory list to create a new directory, this command will make one for you. You have to type mkdir, and your folder name in small-cap and press enter. You can see in the below screen we created the directory as ‘folder.’ type the ls command again, and you will able to locate your new directory.
3. cd Command
After you create a new directory, you have to use the cd command if you want to move in into the new directory—type ‘cd’ and the desired folder name in the Linux window and press enter.
In this screen you can see we successfully entered in our new directory called ‘newfolder’ with command cd.
To enter in sub directory you need to give full path after cd command like this.
cd myfolder/subdirectory and press Enter.
Now , if you want to go back then simply type two dots after cd like this
this command will take you one step back.
4. touch Command
Our Fourth command is ‘ touch. ‘ This command will make a new file for you. Please make sure you go to the desired folder first using the cd command and then give the touch command and a new file name. For example, you can see in the below screen we made a file named ‘eWebGuru’ into my folder directory we made earlier
You can see how we went into my folder directory from the root using the cd command, and then we made a file with the name ‘ewebguru.’ We can see a created file with the ls command.
You can remove entire folder by giving this command. rm -r folder name
5. cp command
This command will help you to copy file. Make sure you are in the folder where the source file is located, type command cp, and source file name and new copied file name.
You can see in this example we went to my folder directory and copied file;ewebguru’ to ‘ewebguru1’. After giving the ls command, both files are visible.
Ashok Arora is CEO and Founder of eWebGuru a leading web hosting company of India. He is a tech enthusiast with more than 25 years of experience in Internet and Technology.
Ashok is Master in Electronics from a leading Indian university.
Ashok loves to write on cloud, servers, datacenter, virtualisation technology.