This article will cover some essential SSH commands to help you start managing your server via SSH. While this guide includes only a subset of available SSH commands, these are the ones you’ll use most often.
1. ls
Displays all files and directories in your current directory.
Examples:
1. Show all files, directories, and additional details for each:

2. Display only files that end with ".html":

2. pwd
Displays the full path of your current directory.
3. cd
Changes your current directory.
Examples:
1. Return to your home directory:

2. Navigate to the /var directory:

3. Move back one directory:

4. Move up one directory level:

4. cat
Displays the contents of a specified file.
Example:
View the contents of the index.html file:

5. chmod
Modifies the permissions for users and groups on a file.
Examples:
1. Remove all access permissions for the config.html file:

2. Grant only the current user access to the file:

3. Make the file accessible to everyone:

6. chown
Changes the owner or group of a file.
Examples:
1. Change the owner of config.php to root:

2. Set both the owner and group of config.php to root:

7. tail
Similar to cat, but displays the end of a file.
Examples:
1. View the last 20 lines of /var/log/messages:

2. Show the last 100 lines:
8. more
Works like cat, but shows text one screen at a time.
Example:
View the contents of '/var/log/messages', advancing with the 'SPACE' bar, and exiting with q:

9. pico
A simple text editor.
Example:
1. Open index.html for editing:

10. w
Displays a list of users currently connected to the server.
11. top
Provides real-time information on server resources, such as RAM, uptime, and active processes.
12. touch
Creates an empty file.
Example:
1. Create a file named contacts.html in /home/useris/public_html/:

13. mkdir
Creates a new directory.
Example:
1. Create a directory named photos:

14. cp
Copies files from one location to another.
Examples:
1. Copy index.html to index2.html in the same directory:

2. Copy all files from /public_html/test/ to /public_html/:

15. mv
Moves files to a different directory. Usage is similar to the cp command.
16. rm
Deletes files.
Examples:
1. Remove index2.html:

2. Force delete index2.html without confirmation:

3. Remove all files ending in ".html":

17. clear
Clears the terminal screen.
18. exit
Disconnects from the SSH session.
19. tar
Creates or extracts file archives.
Examples:
Extract a .tar.gz file:

Extract a .tar file:

Create an archive of the "test/" directory:

Unzip a .gz file:

20. history
Displays the last 50 commands used.
21. wget
Downloads files from the internet.
Example:
Download a file from a URL:
wget https://urloffile/file.exe