If you have just obtained your Raspberry Pi or have been using one for a while, you have realized that the terminal is where you will spend most of your time working with this device. Whether using the Pi as a DNS server for your home network, a smart home hub, a media server, or working on any other project, familiarizing yourself with basic commands is essential to make everything smoother. I have been using a Raspberry Pi for various projects, and several commands are like an everyday toolkit. Some are basic and suitable for getting started, and some are advanced, perfect for digging deeper into the system or automating tasks. Below are the main ones.
5 Raspberry Pi projects I use to control my home
My Raspberry Pi SBCs and microcontrollers have proven their worth just with these smart home control projects
5 Sudo raspi-config
Set up and configure your Pi
If you have just bought your Raspberry Pi, this command is one of the first tools you’ll use to set it up. To use it, open the terminal and run 'sudo raspi-config'. A simple menu bar will launch with the option to tweak a wide range of settings for the system, display options, interface options, performance, localization, and advanced options. There is also an option to update the configuration tool to the latest version. Use the arrow buttons on your keyboard to select an option.
When you select the system option, for example, a menu bar will launch, and you will see various options available. For example, an option to change your system password and hostname, an option to select the boot options, choose the default web browser, and an option to set the storage location for logs.
4 Sudo apt update
Keep your Raspberry Pi updated
Like in other operating systems, you need to keep your Raspberry Pi up to date to maintain security and performance, and even access the latest features. Run the command 'sudo apt update' to start updating the system. This command checks the official Raspberry Pi package repositories for any latest information about the available software and updates. This doesn’t install anything yet, it simply refreshes the package list of the system so it knows which updates are ready.
Once the list is refreshed, you can upgrade all the packages installed using the command 'sudo apt full-upgrade-y'. This command will handle package dependencies and remove or replace outdated packages. I added the ‘y option so it automatically answers “yes” to any prompts and allows you to continue without typing anything. If you would like to check and remove any leftover packages that are no longer needed, run the command 'sudo apt autoremove'.
3 Htop
Monitor Raspberry Pi resources
When running resource-intensive applications or multiple services, I like monitoring how resources are utilized, like CPU usage, memory consumption, storage space, and temperature. This is essential in detecting performance issues early on. 'htop' is the command that I use to achieve this. It’s just like Windows task manager, but entirely within the terminal. Its color-coded layout provides a live overview of how each CPU core is performing, what processes are consuming the most memory, and how much swap is being used, all in one scrollable interface.
What I particularly like about this command is that it’s interactive. I can easily sort processes using CPU or memory, kill any misbehaving tasks directly, and even see system uptime and load averages without running multiple commands. If I notice issues like RAM nearing capacity, I know it's time to optimize the code or stop non-essential services. In addition to HTOP, you can pair it with other commands like 'vcgencmd measure_temp' to monitor temperature, or 'df -h' to check on disk usage.
6 Raspberry Pi upgrades that are totally worth it in 2025
If you are looking for some of the best Raspberry Pi upgrades you should get, here are some awesome suggestions
2 SSH command
Remotely access and manage your Raspberry Pi
Sometimes, I remotely connect to my Pi from another computer without having to plug in a monitor, keyboard, or mouse, and this is possible by using the SSH command. It lets you install software, run scripts, edit files, monitor resources, and even reboot or shut down the device entirely from another machine. After setting up, run the SSH command with your Pi address. If SSH is not enabled by default, you can activate it via raspi-config. Do this by running the command 'sudo raspi-config' on the terminal. From there, you can navigate to the interface options, select SSH, and choose “Yes” to enable it. After that, exit, and then the SSH service will start, and you should be able to connect remotely using the SSH command from another computer.
1 Cron
Schedule and automate tasks on Raspberry Pi
When I first got my Raspberry Pi, I used to run most of my scripts and programs manually. It did the job, but I often found myself forgetting to run something or missing a step, and later, I came to know about the Cron command for scheduling tasks. Now, I set up scripts to run automatically on a schedule, which saves time and keeps things running smoothly, even when I am not supervising. To use this command, run the command 'crontab -e', and it will open a cron table that lists scheduled tasks that run at specific times and dates, and you will see an option to select an editor. After selecting the text editor, you will see a crontab file with instructions, and you can edit the tasks based on your requirements, save, and exit.
Run your Raspberry Pi smoothly with commands
When you run the commands I have listed here, you will realize just how much control you have from the command line. While many other commands are available, these are some of the most useful ones you should know. As powerful as the Raspberry Pi is, it’s the terminal that truly unlocks its full potential. Learning and using the proper commands saves time and helps you avoid common mistakes and get the most out of your projects.
