Need to know – Basic SSH Commands

Time to read: 4 mins

The SSH (Secure Shell) protocol lets a user connect remotely to a computer from another. The communication goes through an encrypted connection. It uses public key cryptography to ensure a safe connection to the SSH Server from an SSH Client. Here are some basic SSH commands that you need to know.

CommandWhat the command action does
exitThis exits the connection
rebootThis will reboot the device
sudoAllows you to run commands as a “Super User”
lsShow directory contents
cdChange Directory
mkdirCreate a new folder
touchCreate a new file
pwdShows current directory (full path to where you are right now)
catShow contents of a file
rmRemove a file/folder
cpCopy a file/folder
mvMove a file/folder
grepSearch for a specific phrase in file/lines
findThis searches files and directories
vi/nanoText Editors
historyShows the last 50 used commands
clearThis clears the screen
tarCreate and Unpack Compressed Archives
wgetDownload Files from the internet
duGet File Size
headLets you read the first 10 lines of content inside a file.
tailLets you read the last 10 lines of contents inside a file
zipA compression and file packaging utility
unzipThis is to decompress a file package
chmodStands for “Change Mode” – Changes file/folder permissions

Leave a Reply

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