These are the 41 Most Useful SSH Putty commands to help you manage the VPS (Virtual Private Server) or EC2(AWS) or Compute(OCI) or Azure(VM) or Dedicated Server.
These putty commands should help you in your daily work on the server. I have included SSH Putty commands for all major Linux distributions like Cent-OS, Ubuntu
(1)How to connect to the Server using putty
Download Putty here
(a)Provide Hostname or IP address of the VPS or dedicated server
(b) Choose SSH or telnet
(c) For SSH, it will ask for verification of keys
(d) Provide username and password and login to the system
we can use the puttycm tool.It is very useful if you are managing multiple server
Use ls command ls: it will list the file ls -lrt: it will list files in order of timestamp ls -l: it will list files with details ls -lrth: it will list files in order of timestamp and give the sizes in KB, MB,GB ls -lrta: it will list files in order of timestamp along with hidden files
rmdir can be used to delete the directory. The directory must be empty for deletion from this command
rmdir <directory name>
(17) How to kill a process
Sometimes, you may want to kill a stuck process. You can use the kill command to do it. We need to get the PID of the process and then kill using the below command
kill <pid>
(18) How to search for a string across the files
You can use the grep command to do it. Read the below-detailed article on it
You may often want to backup the directory or folder before performing changes on the system. We can use the tar command for this. It is a very useful utility to perform backup
tar -cvf foldername.tar foldername tar -xvf foldername.tar
(40)File Manipulation command We can use awk or sed for that. These are very powerful command
ps -ef|grep pmon|awk '{print $NF}'
Please read the below articles for details
sed command:- sed command is a Stream Editor – works as a filter processing input line by line And here are 32 Useful sed command examples in Linux/Unix awk command:-Awk command in Unix or Linux is a powerful command for processing text. Learn about awk syntax, records, fields, line Separator with examples of awk in Unix
(41) man command to know about the option for the above command We can use man man history
I hope you like this compilation of useful SSH Putty commands. This is not at all the complete list. I have just tried to compile the most used ones. Please do let me know what other command should I add to this list
Bonus Command
(1) how to check the hostname
hostname
(2) How to check the host IP
hostname -i
(3) How to create a zero-byte file
touch a.txt
(4) How to create the zip file
zip target.zip <file1> <file2>
(5) How to unzip the zip file
unzip target.zip
Related Articles
How to install SSH on Ubuntu: This post on how to install SSH on Ubuntu and troubleshoot various issues while implementing it Linux Tutorials: List of all the Linux Articles to help in getting good knowledge on Linux Day to day Activities Linux command for Oracle DBA: This post list all the Linux command that Oracle DBA must know in order to be successful Unix shell scripting interview questions: Great compilation of Unix shell scripting interview questions for success in any interviews. Examples are given for the command also split Unix command: Details about Split command, how we can split based on lines, bytes, and much more how to tar a directory in Linux: how to tar a directory in Linux, tar command example, tar compress directory, tar gzip command, untar/extract command, tar cvfz command, tar xvfz command https://en.wikipedia.org/wiki/PuTTY
The Unix command has the following common pattern command_name options argument(s) Here we are trying to give some of the basic unix command in Unix Information…
Great list! Thanks for compiling these SSH Putty commands. I found the explanations very helpful, especially for the less commonly used ones. Can’t wait to try them out in my projects!
Thanks for sharing the knowledge, keep up the good work.
Thanks Princess
Typo fix; lowercase u in uptime
thanks.I have fix it
Nothing Use-full for beginners Not mentioned any ” Return Results OR The Errors ” So iwill give you Only one l;Little star
You has been mistaken in the 28 cmd kindly make it correct. into section “(Useful SSH Putty commands)”
Great list! Thanks for compiling these SSH Putty commands. I found the explanations very helpful, especially for the less commonly used ones. Can’t wait to try them out in my projects!