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
wallThis broadcasts a message to all logged-in users
wThis displays all logged-in users
whoThis provides a more detailed look at the logged-in users

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.