15 most used SSH commands for Raspberry Pi – SSH for Raspberry Pi

We talked about SSH in the past and learned that SSH is a cryptographic network protocol for operating network services over an unsecured network. SSH provides an encrypted secure channel between you and the server without the need for a secure network. Today, I will show you 15 most used SSH commands. Specifically, must know SSH commands and Raspberry Pi SSH commands to help you get by in the SSH world. Without further ado, let's get started. Β [Read:Β Introduction to SSH: What is SSH?]

SSH for Raspberry Pi

In order to use the SSH commands shown in this article, you canΒ connect via SSH from your smartphone using JuiceSSH. If you need to connect from a Windows machine, here are 10 best SSH clients for Windows.

15 most used SSH commands - Raspberry Pi SSH commands

apt-get update

apt-get update

This is one of the most used SSH commands on every Linux distribution. It updates the package list and shows information on the newest version of packages and their dependencies.

Apt-Get Update Performs An Update To The Package List - Most Used Ssh Commands
The Apt-Get Update Command Performs An Update To The Package List

apt-get upgrade

apt-get upgrade

Following the update command, apt-get upgrade is a must know SSH command. By running it, it will download the new versions of packages based on the update performed before, and install them.

Apt-Get Update Performs An Update To The Package List - Most Used Ssh Commands
Apt-Get Upgrade Performs An Update To The Package List

mkdir

mkdir

Another must-know SSH command, mkdir will create a new folder. By running the command mkdir Projects you create a new folder called "Projects."

Mkdir Command Creating The Projects Folder - Most Used Ssh Commands
Mkdir Command Creating The Projects Folder

rm

rm

The rm command removes a folder or file.Β By running the command rm Projects you remove the folder called "Projects."

touch

touch

One of the most used SSH commands used to create a file. By running the command touch readme.txt you will create the file readme.txt on your file system.

ls

ls

When running the ls command, you are listing all the files from the folder you are located. Below, the ls command was used in the / location.

Ls Command In The Root Folder - Must Know Ssh Commands
Ls Command In The Root Folder

nano

nano

A commonly used SSH editor, Nano allows you to edit files right in the SSH windows. By running the command nano followed by the location of the file, you open the file for editing, making it one of the most used Raspberry Pi SSH commands.

Nano Interface When Editing Files - Must Know Ssh Commands
Nano Interface When Editing Files

reboot

reboot

Pretty much self-explanatory. When you run the reboot command, the system will perform a restart. This is a must-know SSH command for Raspberry Pi in order to remotely perform a reboot.

startx

startx

This is the command used to open the graphical user interface (GUI). It is one of the most used Raspberry Pi SSH commands after booting in a Linux distribution, like Debian.

ifconfig

ifconfig

With the ifconfig command, you show the status of the network. It's the easiest way to determine the IP of the machine making it one of the must-know SSH commands.

Ifconfig Command Showing Network Information - Must Know Ssh Commands
Ifconfig Command Showing Network Information

wget

wget

The command wget retrieves content from web servers. With this command, you can download a file from a web page. For instance, wget http://downloads.com/file.txt will download the file.txt locally to your machine.

raspi-config

raspi-config

Used when the configuration menu for the Raspberry Pi needs to be accessed.

Raspi-Config Command - Must Know Ssh Commands
Raspi-Config Command

top

top

The top command is one of the must-know SSH commands for Linux systems for opening the integrated "task manager" from Linux. It shows the running processes list, CPU, memory, and disk usage.

Top Command Showing The Tasks Running On The Machine - Raspberry Pi Ssh Commands
Top Command Showing The Tasks Running On The Machine

top is included with all Linux operating systems, but if you need more information from SSH, make sure you check htop which is an improved version of top. You can find more information about htop in ourΒ introduction to SSH and htop for LinuxΒ article

arrow up key

Although it's not technically a command, this is extremely useful for new SSH users. When you press arrow up key, you bring up the last entered command. When pressing the key multiple times, you can bring up older commands entered in the past.

Recommended Guides Secure Shell/SSH:

ping

ping

One of the most used Raspberry Pi SSH commands, and also one of the most popular SSH commands available, ping allows you to test the connectivity to another host. By running ping 192.168.0.2 you can test if there is connectivity between your machine and the other. When you run the ping raspberry command, you test the connectivity to the machine named Raspberry. Besides that, you also get the IP used by the machine named "raspberry."

Ping Command Used To Test Connectivity To Another Ip - Raspberry Pi Ssh Commands
Ping Command Used To Test Connectivity To Another Ip

You learned the must know SSH commands: What to do next

Congratulations! After learning the 15 most used SSH commands, you are now able to get around when connecting via SSH. If you want to expand your SSH knowledge, check our article on how to simplify SSH access by using SSH config file on a remote serverΒ and connecting to Ubuntu Server using SSH Keys and Putty. There are a lot more commands available so make sure you check back soon, for new articles about SSH.

Be the 1 in 200,000. Help us sustain what we do.
35 / 150 by Dec 31, 2024
Join Us (starting from just $1.67/month)