How to Fix Low Disk Space Issues on Ubuntu Linux
Raspberry Pi OS is generally used in a graphical environment, but to use a Raspberry Pi efficiently, working with the terminal (Command Line Interface) is very convenient.
By using terminal commands, you can quickly and accurately perform most tasks such as checking system status, managing files, configuring network settings, and installing packages.
For users who are new to Raspberry Pi, this will be helpful during learning and development.
pwd – Display the Current Working Directorypwd
Displays the full path of the current directory.
This is one of the most basic commands and is helpful when you are unsure of your current location in the file system.
![]() |
| pwd command |
ls – List Directory Contentsls
ls -l
ls -a
Shows files and directories in the current location.
Using options allows you to view detailed information or hidden files.
![]() |
| ls command |
![]() |
| ls -l command |
cd – Change Directorycd folder_name
cd ..
cd ~
Moves between directories.
.. refers to the parent directory, and ~ represents the home directory.
mkdir – Create a Directorymkdir test
Creates a new directory.
This command is commonly used when organizing projects or practice environments.
![]() |
| mkdir command |
rm – Remove Files and Directoriesrm filename
rm -r directory_name
Deletes files or directories.
Because deleted files are difficult to recover, this command should be used with caution.
cp – Copy Files and Directoriescp source destination
cp -r folder1 folder2
Copies files or directories.
This command is especially useful for backup tasks.
mv – Move or Rename Filesmv old.txt new.txt
Moves files to a new location or renames them.
cat – Display File Contentscat filename
Outputs the contents of a text file to the terminal.
Frequently used to check configuration files.
nano – Terminal-Based Text Editornano filename
Nano is one of the most commonly used terminal editors in Raspberry Pi OS.
It is suitable for quickly editing configuration files.
top – Monitor System Resourcestop
Displays real-time information about CPU usage, memory usage, and running processes.
Very useful for monitoring system performance.
![]() |
| top command |
![]() |
| top command execution |
df – Check Disk Usagedf -h
Shows total disk space and available storage.
This is essential for managing SD card storage.
![]() |
| df command |
free – Check Memory Usagefree -h
Displays the current usage of RAM and swap memory.
![]() |
| free command |
uname – Display System Informationuname -a
Shows kernel version and system architecture information.
![]() |
| uname command |
sudo – Run Commands with Administrative Privilegessudo command
Used to execute commands that require administrator permissions.
Frequently used when installing software or changing system settings.
apt update – Update Package Listssudo apt update
Refreshes package information from repositories.
It is recommended to run this before installing new software.
apt upgrade – Upgrade Installed Packagessudo apt upgrade
Upgrades installed packages to the latest available versions.
apt install – Install Software Packagessudo apt install git
Installs required software packages.
This command is essential for expanding system functionality.
ip addr – Check Network Informationip addr
Displays network interfaces and assigned IP addresses.
Commonly used when setting up SSH connections.
ping – Test Network Connectivityping google.com
Checks whether the network connection is working properly.
This is one of the simplest ways to diagnose connectivity issues.
reboot / shutdown – Restart or Shut Down the Systemsudo reboot
sudo shutdown -h now
Used to safely restart or shut down the Raspberry Pi system.
Using terminal commands in Raspberry Pi OS is an important process for understanding the operating system and the system architecture.
The commands introduced above are repeatedly used in almost every situation when working with a Raspberry Pi.
Regardless of whether you use Raspberry Pi for learning, development, or other purposes, knowing and using these basic commands will greatly improve both problem-solving skills and work efficiency.