Raspberry Pi — Common CLI Commands Reference

Jul 14, 2026 11:55am · 2 views
raspberry piclilinuxterminalcommandsssh1c3d
Markdown

Raspberry Pi — Common CLI Commands Reference

System Info

CommandWhat it does
uname -aKernel version and arch
cat /proc/cpuinfoCPU details, Pi model
df -hDisk usage
free -hMemory free/used
vcgencmd measure_tempCPU temperature
vcgencmd get_throttledCheck throttling (overheating/undervoltage)
hostname -IIP address

Process Management

CommandWhat it does
top / htopLive process list
systemctl status serviceCheck service status
systemctl start/stop/restart serviceControl services
systemctl enable/disable serviceAuto-start on boot
journalctl -u service -fFollow service logs

Network

CommandWhat it does
ip addrNetwork interfaces and IPs
ping -c4 8.8.8.8Test internet
nmap -sn 192.168.1.0/24Scan local network
curl ifconfig.meExternal IP

Packages

CommandWhat it does
sudo apt updateRefresh package list
sudo apt upgradeUpgrade packages
sudo apt install packageInstall
sudo apt autoremoveRemove unused deps

GPIO (raspi-gpio)

CommandWhat it does
raspi-gpio getAll GPIO pin states
raspi-gpio set 17 opGPIO 17 as output
raspi-gpio set 17 dhGPIO 17 high
pinoutVisual GPIO diagram

SSH Quick Reference

ssh [email protected]
scp file.txt [email protected]:~/
touch /boot/ssh  # enable SSH headless

Links