5 Basic SSH Commands to handle VPS or Server.

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.

5 Basic SSH Commands to handle VPS or Server. 1
ls command results

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

2.mkdir command

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.

5 Basic SSH Commands to handle VPS or Server. 2

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.

5 Basic SSH Commands to handle VPS or Server. 3

In this screen you can see we successfully entered in our new directory called ‘newfolder’ with command cd.

eWebGuru Tips

While giving commands to the server ‘right click’ of mouse means ‘paste’ so DON’T use ctrl + v

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

cd ..

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

5 Basic SSH Commands to handle VPS or Server. 4

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.

5 Basic SSH Commands to handle VPS or Server. 5

You can remove entire folder by giving this command. rm -r folder name

5 Basic SSH Commands to handle VPS or Server. 6

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.

5 Basic SSH Commands to handle VPS or Server. 7

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.

Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *