Home » Home Server » 15 most used SSH commands for Raspberry Pi – SSH for Raspberry Pi

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.  [ReadIntroduction 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 Reading:

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.

We Are Hiring: Familiar with Media Streaming, HTPC, Home Server, Smart Home, and Home Automation topics? Write about it and earn money. No writing experience needed. APPLY HERE.

Get 20% OFF with IPVanish VPN:

♦   Hide your browsing and streaming activity: No logs and no tracking
♦   Access geo-restricted content from anywhere
♦   Encrypt and anonymize: Kodi, Plex, Downloads, Personal Info
♦   Windows, Mac, Linux, Android, iOS, Router, and more.
♦   Money back guarantee - Sign Up Now

Smart Home Beginner

Join the other 110,000 followers