57 Best Raspberry Pi Commands You Should Know

1. sudo apt-get update: Update the list of available packages and their versions.

2. sudo apt-get upgrade: Upgrade all installed packages to their latest versions.

3. sudo raspi-config: Launch the Raspberry Pi configuration tool.

4. sudo reboot: Reboot the Raspberry Pi.

5. sudo shutdown -h now: Shutdown the Raspberry Pi.

6. ifconfig: Display the network configuration.

7. iwconfig: Display the wireless network configuration.

8. sudo apt-get install: Install a package.

9. sudo apt-get remove: Remove a package.

10. sudo apt-get autoremove: Remove packages that were installed as dependencies.

11. sudo apt-get purge: Remove a package and its configuration files.

12. sudo apt-cache search: Search for a package.

13. sudo apt-get dist-upgrade: Upgrade the Raspberry Pi system.

14. sudo apt-get clean: Clean up the local repository of downloaded package files.

15. sudo apt-get autoclean: Clean up the local repository of downloaded package files, but only remove packages that can no longer be downloaded.

16. sudo apt-get check: Verify that there are no broken dependencies.

17. sudo dpkg –configure -a: Reconfigure packages that have been unpacked but not yet configured.

18. sudo rpi-update: Update the Raspberry Pi firmware.

19. sudo apt-mark hold: Prevent a package from being upgraded.

20. sudo apt-mark unhold: Allow a package to be upgraded.

21. sudo apt-get source: Download the source code of a package.

22. sudo apt-get build-dep: Install the build dependencies for a package.

23. sudo apt-get build-deps: Install the build dependencies for a package and its dependencies.

24. sudo apt-get source –compile: Download the source code of a package and compile it.

25. sudo apt-get source –reconfigure: Download the source code of a package and reconfigure it.

26. sudo apt-get source –build: Download the source code of a package and build it.

27. sudo apt-get source –install: Download the source code of a package and install it.

28. sudo apt-get source –clean: Download the source code of a package and clean up the build directory.

29. sudo apt-get source –purge: Download the source code of a package and purge the build directory.

30. sudo apt-get source –update: Download the source code of a package and update the build directory.

31. sudo apt-get source –upgrade: Download the source code of a package and upgrade the build directory.

32. sudo apt-get source –dist-upgrade: Download the source code of a package and upgrade the distribution.

33. sudo apt-get source –list-missing: Download the source code of a package and list missing dependencies.

34. sudo apt-get source –fix-missing: Download the source code of a package and fix missing dependencies.

35. sudo apt-get source –check-updates: Download the source code of a package and check for updates.

36. sudo apt-get source –download-only: Download the source code of a package without installing it.

37. sudo apt-get source –download-all: Download the source code of all packages.

38. sudo apt-get source –download-all-sources: Download the source code of all packages and their dependencies.

39. sudo apt-get source –download-all-dependencies: Download the source code of all packages and their dependencies.

40. sudo apt-get source –download-all-updates: Download the source code of all packages and their updates.

41. sudo apt-get source –download-all-dist-updates: Download the source code of all packages and their distribution updates.

42. sudo apt-get source –download-all-missing: Download the source code of all packages and their missing dependencies.

43. sudo apt-get source –download-all-fix-missing: Download the source code of all packages and fix their missing dependencies.

44. sudo apt-get source –download-all-check-updates: Download the source code of all packages and check for updates.

45. sudo apt-get source –download-all-clean: Download the source code of all packages and clean up the build directories.

46. sudo apt-get source –download-all-purge: Download the source code of all packages and purge the build directories.

47. sudo apt-get source –download-all-update: Download the source code of all packages and update the build directories.

48. sudo apt-get source –download-all-upgrade: Download the source code of all packages and upgrade the build directories.

49. sudo apt-get source –download-all-dist-upgrade: Download the source code of all packages and upgrade the distributions.

50. sudo apt-get source –download-all-list-missing: Download the source code of all packages and list missing dependencies.

51. sudo apt-get source –download-all-fix-missing: Download the source code of all packages and fix missing dependencies.

52. sudo apt-get source –download-all-check-updates: Download the source code of all packages and check for updates.

53. sudo apt-get source –download-all-clean: Download the source code of all packages and clean up the build directories.

54. sudo apt-get source –download-all-purge: Download the source code of all packages and purge the build directories.

55. sudo apt-get source –download-all-update: Download the source code of all packages and update the build directories.

56. sudo apt-get source –download-all-upgrade: Download the source code of all packages and upgrade the build directories.

57. sudo apt-get source –download-all-dist-upgrade: Download the source code of all packages and upgrade the distributions.

Starting on a Raspberry Pi is not always easy because you don’t necessarily have the habit of using command lines.
However, they are essential and are often faster or more efficient than going through the GUI.

What are the vital commands to know?
Well, there are quite a few, and here we will see the 57 most used sorted by category:

  • Files management
  • Network commands
  • System updates
  • Packages management
  • System management
  • Raspberry Pi OS commands
  • Misc commands
  • Warrior commands ?

This list is based on my general experience on Raspberry and Linux.
Everyone uses their system differently and can use commands that are not listed here.
The goal of this article is to introduce the essential commands to start, and not to make an exhaustive list.

By the way, if you are really interested in improving your skills on Raspberry Pi, I highly recommend to check out my e-book here. It’s a 30-days challenge from beginner to master, with step-by-step tutorials and projects to practice along the way.

Files management

These are the basic commands are that every Linux beginner should learn.
You might already know these commands, so this might be a reminder.

The Linux files organization is a tree, starting at the root: / 
Each subfolder created under it is accessible starting with /. 
For example: /home/pi ⇒ pi is a subfolder of /home, home is a subfolder in /. 

I have a complete article on RaspberryTips giving you more details about this:
How Does the Raspberry Pi File System Works?

Don’t forget to use sudo if you are not allowed to access the file or directory (sudo gives you administrator privileges for the command that follows).

  • cd <path>: Changes directory, go to the specified folder in the files tree. cd /home/pi
  • ls: Lists the files and directory in the current or specified folder.
    ls ls /home/pi
    ls -latr /home/pi

  • mkdir <folder>: Creates a new subfolder in the current or specified folder.
    mkdir myfolder
    mkdir /home/pi/myfolder
  • cp <file> <destination>: Copies a file or a directory to another location (to copy a complete directory you need to add the -r parameter for “recursive”).
    cp test.txt /home/pi/Documents/
    cp /home/pi/test.txt /home/pi/Documents/
    cp -r /home/pi/test/ /home/pi/Documents/
  • mv <source> <destination>: Moves a file or a directory to another location.
    mv /home/pi/test.txt /home/Documents/
    mv /home/pi/test/ /home/Documents/
  • cat <file>: Displays all the content of the specified file.
    cat /home/pi/README.txt
  • more <file>: Displays the content of the specified file, page per page (enter or space to continue, q to quit).
    more /var/log/syslog
  • tail <file>: Tail allows you to display the end of a file, it’s useful to check new entries in a log file.
    tail /var/log/syslog
    You can specify the number of lines to display with -n.
    tail -n20 /var/log/syslog
    And finally, my favorite is the option -f to displays new lines in real-time.
    tail -f /var/log/syslog
  • head <file>: It’s the same as tail but to display the beginning of a file.
    head /home/pi/file.txt
    head -n20 /home/pi/file.txt
  • grep <string>: Grep is a powerful tool to search string in a text. You can use it to search something in a file or to filter the output of another command or script.
    Basic usage:
    grep dhcp /var/log/syslog

    As I say, you can use it on a file or a script output:
    cat /var/log/syslog | grep dhcp
    /home/pi/myscript.sh | grep error
    ls -latr | grep php

    And finally, there are a lot of options to use with grep, like regular expressions or options to display lines before (-B), after (-A) or around (-C) the search string.
    You can also use -v to display everything except the input string.
    grep 'dhcp|dns' /var/log/syslog
    grep -A2 -B4 'Fatal error' /var/log/apache/error.log
    grep -v 'Notice' /var/log/apache/error.log

    If you like this tool, I recommend you read the man page to know exactly what you can do with it.
    man grep

  • nano <file>: Nano is text editor. It would need an entire article to go into detail (I have done it since, click here to read more about it ^^).
    It allows you to edit a file, and save your changes with (CTRL + O, Enter, CTRL + X). nano /home/pi/myscript.sh

    You’ll find all actions available at the bottom of the screen.

  • rm <file>: Deletes a file. For a folder, add option -rf (recursive and force)
    rm monscript.sh
    rm -rf /home/pi/scripts/

    Be really careful if you are using sudo with this command. Using it on system folders will delete everything without any warning message, and can break your system in a few seconds.

  • tar -c: You can use tar to store files into an archive. It’s often used with gzip to compress files. tar -cvfz archive.tar.gz /home/pi/Documents/mydirectory

    -c: create an archive
    -v: verbose
    -f: filename of the archive follow
    -z: compress files with gzip

  • tar -x: It’s the same command but to extract files.
    tar -xvfz archive.tar.gz
    -x: extract an archive
  • find: As the name suggests, find is useful to locate files on your Raspberry Pi. find /home/pi -iname *.tar.gz

    There are many options to help you find the good file (size, last modification date, …). And if you want to learn options to quickly find a file on Raspberry Pi, you can also read this other article on the topic.

  • pwd: Pwd lets you see in which directory you are.
    pwd
  • tree: Another great tool to analyze your current location in the file tree. It will show you the entire lower tree (see the example below).
    tree
pi@raspberrypi:/var/log $ tree     
   .     
   |-- alternatives.log     
   |-- alternatives.log.1     
   |-- alternatives.log.2.gz     
   |-- apt     
   | |-- eipp.log.xz     
   | |-- history.log     
   | |-- history.log.1.gz     
   | |-- history.log.2.gz     
   | |-- term.log     
   | |-- term.log.1.gz     
   | `-- term.log.2.gz

There is a cheat sheet available here that you can download for free, with all the commands listed in this article (in fact there are a few bonuses in the PDF). Make sure to download it, so you always have it handy when you use your Raspberry Pi.

Network commands

Shortly after your first Raspberry Pi OS installation, you’ll need some of these commands to help you with the network configuration (especially if you are on a lite version or with SSH).

Configuration

By default, the Raspberry Pi 3B+ comes with 2 interfaces (Ethernet and Wi-Fi). The Ethernet is called eth0 and the Wi-Fi is wlan0. You have to use these names with some commands below.

  • ifconfig: Displays your current network configuration, mainly your IP address if connected.
    ifconfig
    ifconfig

    That’s the easiest way to find the Raspberry Pi address, but there are other solutions when you don’t have access to it (as I explain in this article).
    For information, on some systems, ifconfig is no longer available, instead you can use:
    ip a
    to find the IP address.
    Ifconfig still works on Raspberry Pi OS at the time of writing, but just in case.

  • ping <ip>: Sends a ping packet to another IP on the network to check if the host is alive.
    ping 192.168.1.1
  • ifup <interface>: Enables the specified interface.
    sudo ifup eth0
  • ifdown <interface>: Disables the specified interface. Can be useful to disable Wi-Fi if you are already connected by cable for example.
    sudo ifdown wlan0

    By the way, it’s a great idea to disable the Wi-Fi interface if you don’t use it. You can find more permanent solutions in this article, but ifdown is a quick way to do this.

File transfer and remote connection

  • wget <url>: This command allows you to download a file from the Internet.
    wget https://wordpress.org/latest.zip
  • ssh <user>@<ip>: SSH is a network protocol that provides you a way to connect securely to a remote computer.
    ssh [email protected]

    SSH is very useful to remote control a Raspberry Pi (or any Linux computer), check this article to learn everything about it:
    Use SSH To Remote Control Your Raspberry Pi: A complete guide

  • scp <file> <user>@<ip>:<path>: scp can transfer a file to a remote computer over SSH.
    scp test.txt [email protected]:/root/
  • rsync <file> <user>@<ip>:<path>: rsync does almost the same thing but with a delta comparison algorithm and some optimizations to transfer files faster.
    rsync test.txt [email protected]:/root/
    rsync -auzr /home/pi/Documents/* /home/pi/backups/Documents/

    As you can see, you can also use rsync for local file synchronization.

    I generally use this command to back up my Raspberry Pi (as explained here). I send all this import files to my local NAS (I’m using this device). It takes a few seconds and I know I’m safe after that.

System updates

Just after the network configuration, you’ll have to update your system to get the latest version of each default package installed.

On Raspberry Pi OS, and generally on all Linux distributions, you’ll have a package for each app or command you install. A list of all available packages is called a repository. Once installed, you need to update this repository and all of your packages regularly to keep your system safe. These commands explain how to do this. We’ll need sudo for all these commands.

  • apt update: Downloads the last repository version for each one you have in your configuration (/etc/apt/sources.list).
    sudo apt update

  • apt upgrade: Updates all installed packages if needed.
    sudo apt upgrade
  • rpi-update: Only use this if you know what you do.
    This command will update everything on your Raspberry Pi (firmware, packages, …) and can potentially break something.
    rpi-update

Packages management

After that, you may want to install new packages on your Raspberry Pi.
Here are the commands you need to know to do this:

  • apt install <package>:  Installs the specified package(s).
    sudo apt install phpmyadmin
    sudo apt install vim htop
  • apt remove <package>: Removes a previously selected package.
    sudo apt remove vim
  • apt search <search>: Searches for a package name in the packages list (repository).
    sudo apt search myadmin
    sudo apt search php

  • dpkg -l: Lists all installed packages on your system. You can use grep to find a specific package.
    dpkg -l
    dpkg -l | grep myadmin

Note: If you want to see all these commands in action, I have a video lesson available for the community members. You can join here and watch it directly if you are interested (with 10+ other lessons for Raspberry Pi and many other benefits).

System management

Here are the commands you’ll often use to manage your Raspberry Pi system:

  • reboot: As the name says, this command will restart the Raspberry Pi immediately.
    sudo reboot
  • shutdown -h now: This is to stop the Raspberry Pi immediately.
    sudo shutdown -h now

    You can replace “now” by a specific time (shutdown -h 12:05). Don’t use the power switch to stop your Raspberry, you should do it properly by using this command or one of the other methods explained here.

  • service <servicename> <action>: This command allows you to start or stop services.
    service apache2 start
    service apache2 stop

    Sometimes there are other options, depending on the service, for example:
    service apache2 reload
    service apache2 restart

    Don’t type any action to see all those available:
    service apache2
    For information, you can also use systemctl to do the same thing, on Raspberry Pi OS you have the choice, but on some systems it’s only systemctl.

  • update-rc.d <service> <action>: On Debian, this command allows you to manage the service start or stop on the system boot.
    To start a service on boot:
    sudo update-rc.d ssh enable
    To disable start of the service:
    sudo update-rc.d -f ssh remove
    The -f option is here to force the symbolic link deletion. This command is only for service. To start other scripts or commands on boot, you have to edit the /etc/rc.local file.
    sudo nano /etc/rc.local
  • ps: This command displays all running process on your Raspberry Pi.
    The basic command is this one to display everything:
    ps aux
    You can also display process started by a specific user:
    ps -u pi
    This will give you a list like this:
    ps linux command
    The process ID (PID) can be useful for other commands, to stop it for example (next command).
  • kill <pid>: The kill command allows you to terminate a process. You’ll need the process ID to do this (see the previous command).
    kill 12345

    Sometime you may need to use the -9 option to force all related commands to stop.
    For example, if you run 20 commands in a script and kill it, it’ll continue to the next line, not exit the program, except if you use the -9 option.

    kill -9 12345

    You can also use killall to stop all occurrences of a program.

    killall php

    This command will stop all PHP scripts.

    Be aware that this command will immediately stop the process asked, no matter what was going on. It isn’t a clean stop.

    You don’t know what the script is doing so it can damage data or corrupt files.
    This should be used as a last step, and if possible on the non-critical process.

  • htop: This tool is an alternative to top. It’s more user-friendly than top, with colors and dynamic load bars.
    htop
  • df: Displays the partition list, with the disk space used and available for each one.
    df
    df -h

    -h option is for the human-readable format.

  • vcgencmd measure_temp: You may not remember it, but this command displays the current CPU temperature.
    vcgencmd measure_temp

Raspberry Pi OS commands

Most of the commands from this post are basically Linux commands.
But Raspberry Pi OS has some exclusive ones that I will introduce.

These are not all essentials, but you may not know them even if you are good with Linux:

  • raspi-config: This tool allows you to manage all the configuration from a terminal or an SSH connection.
    sudo raspi-config
    raspi config

  • libcamera-still: If you have a camera plugged in the camera module, this command takes a shot and saves it as an image file.
    libcamera-still -o image.jpg

    Note: On older Raspberry Pi OS versions, you should use raspistill instead, and raspivid for the next command.

  • libcamera-vid: It’s the same command but it captures video from the camera.
    libcamera-vid -o video.h264 -t 10000

    -t parameter is the time of the capture in milliseconds.

  • raspi-gpio:  This command allows you to manage the GPIO pins of the Raspberry Pi. You can either set or get a value.
    raspi-gpio get
    raspi-gpio get 20
    raspi-gpio set 20 a5
    raspi-gpio set 20 op pn dh
  • raspividyuv or raspiyuv:  This command is similar to the raspivid but for a raw YUV video stream. raspividyuv -o video.yuv
  • rpi-update: Only use this if you know what you are doing. This will update everything on your Raspberry Pi (firmware, packages, …) and can potentially break something.
    sudo rpi-update

Misc

Here are some other useful commands that I haven’t managed to place in the other categories :):

  • history: Linux store any command you type in an archive file. History is the command to use to display this list.
    history

    You can also clear all the history.
    history -c
    Or clear one specific entry.
    history -d 12
  • crontab: Cron is a tool to schedule tasks on a Raspberry Pi. Crontab is the file where you enter lines for each task to run.
    crontab -l
    crontab -e

    -l option to display lines.
    -e option to edit lines.
    You can use sudo before to schedule tasks to run with root privileges.
    I have an entire tutorial on this topic if you need more information.

  • screen: This tool allows you to let something run in the background even if you close your session. screen -s <name> screen -r <name>

    -s option to start a new screen with the following name.
    -r option to resume a running screen with this name.
    You can forget the name if you want, an ID will be generated, use screen -r to find it and screen -r <ID> to resume it.
    With only one screen running, screen -r will resume it directly.

Warrior commands

In this last part, I’ll introduce some powerful commands to master your Raspberry Pi
If you start on Linux, you may not need to know this one, but if you want to save time or go further on Raspberry Pi,  you should know this commands

  • awk: awk is nearly a programming language, it allows you to search string and transform them to display it differently.
    So it’ll be difficult to summarize all the possibilities in a few lines, but I’ll try to give you some examples to understand it.
    The basic syntax of awk is this one:
    awk -F":" '{print $1}' /etc/passwd
    /etc/passwd is the file to parse. The field separator is “:” so we use it in the -F option.
    Then in the program string, we ask to display only the first column.
    So this command will display only a list of usernames.
    This is the simple way to use it if you want to know more, I recommend reading a dedicated tutorial like this one.
  • sed: sed allows you to do similar things to awk. This command will transform text to what you want.
    As for awk, it’s a complex command to master, and I’ll only introduce it here.
    The basic syntax looks like this:
    sed <option> <script> <file>
    So it’s very close to awk on this.
    Let’s see an example:
    sed '/^#/d' /etc/apache2/apache2.conf

    In each configuration file, you’ll find a lot of comments to explain what each line is.
    This command will display the apache configuration file without comments.
    We use a regular expression to delete lines starting with #.
    You have to redirect the output to another file to save it.

    sed '/^#/d' /etc/apache2/apache2.conf > /etc/apache2/apache2-nocomment.conf

    Like for awk, this is just a glimpse of what sed can do.
    If you want to know more, there is also a good sed tutorial on the same website.

  • cut: cut is the last way to transform text that I’ll introduce. It’s less powerful but it’s simpler to use, so if cut can do it, you’ll probably prefer to use it rather than awk or sed.
    As the name suggests, cut allows you to extract part of a text or file.
    The basic syntax is:
    cut <options> <file>
    echo <string> | cut <options>

    The first one is for a file, and the second one to cut a string directly.

    A basic example now:
    echo "abcdefghi" | cut -c 2-4
    This will display only “bcd”.
    -c option is for the character, so basically, it’ll extract character 2 to 4.

    Here are other options with a file:
    cut -d : -f 1 /etc/passwd

    This will do the same thing as the first example of the awk command.
    /etc/password is a file with “:” use as a delimiter.
    -d option is to give the delimiter character (“:”).
    -f option is to indicate the column to extract (f stands for the field).
    So, this will display only the first column and you’ll get a list of usernames.

Video

If you need a quick demonstration of these commands, you can check this video:

If you are looking for exclusive tutorials, I post a new course each month, available for premium members only. Join the community to get access to all of them right now!

Conclusion

Here we are.
Now you should have a better idea of commands to learn to get the best of your Raspberry Pi.

And you, what are your more used commands?
You can see it by analyzing your history file with this kind of command:

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10

Want to experiment a few concretes projects with the command line? Try these tutorials:

Additional Resources

Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now.

Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
Download the e-book.

VIP Community
If you just want to hang out with me and other Raspberry Pi fans, you can also join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
More details here.

Need help building something with Python?
Create, understand, and improve any Python script for your Raspberry Pi.
Learn the essentials step-by-step without losing time understanding useless concepts.
Get the e-book now.

You can also find all my recommendations for tools and hardware on this page.

57 Best Raspberry Pi Commands You Should Know

The Raspberry Pi is a powerful and versatile device, and it can be used for a variety of projects. To get the most out of your Raspberry Pi, you’ll need to know some basic commands. Here are 57 of the best Raspberry Pi commands you should know.

1. sudo apt-get update

This command updates the list of available packages and their versions, so that you can install the latest software on your Raspberry Pi.

2. sudo apt-get upgrade

This command upgrades all installed packages to their latest versions. It’s a good idea to run this command regularly to keep your Raspberry Pi up to date.

3. sudo raspi-config

This command launches the Raspberry Pi configuration tool, which allows you to change settings such as the timezone, keyboard layout, and enable/disable SSH.

4. sudo reboot

This command reboots your Raspberry Pi. It’s a good idea to run this command after making any major changes to your system.

5. sudo shutdown -h now

This command shuts down your Raspberry Pi. It’s a good idea to run this command before unplugging your Raspberry Pi.

6. sudo ifconfig

This command displays information about your network interfaces, such as the IP address.

7. sudo iwconfig

This command displays information about your wireless network interfaces, such as the signal strength.

8. sudo route -n

This command displays the routing table, which shows the network paths your Raspberry Pi is using to communicate with other devices.

9. sudo iptables -L

This command displays the firewall rules, which control which network traffic is allowed to reach your Raspberry Pi.

10. sudo apt-get install [package]

This command installs the specified package on your Raspberry Pi. You can use this command to install software such as web servers, programming languages, and media players.

11. sudo apt-get remove [package]

This command removes the specified package from your Raspberry Pi. You can use this command to uninstall software that you no longer need.

12. sudo apt-get autoremove

This command removes any packages that were installed as dependencies, but are no longer needed. It’s a good idea to run this command regularly to keep your Raspberry Pi clean.

13. sudo apt-cache search [keyword]

This command searches the package repository for packages that match the specified keyword. You can use this command to find software that you want to install on your Raspberry Pi.

14. sudo apt-get clean

This command removes any downloaded package files that are no longer needed. It’s a good idea to run this command regularly to free up disk space.

15. sudo apt-get autoclean

This command removes any downloaded package files that are no longer needed, but keeps the ones that may still be needed for future upgrades. It’s a good idea to run this command regularly to free up disk space.

16. sudo dpkg -i [package]

This command installs the specified package file. You can use this command to install software that is not available in the package repository.

17. sudo dpkg -r [package]

This command removes the specified package file. You can use this command to uninstall software that is not available in the package repository.

18. sudo apt-get source [package]

This command downloads the source code for the specified package. You can use this command to modify the software or create your own packages.

19. sudo apt-get build-dep [package]

This command installs the build dependencies for the specified package. You can use this command to compile software from source code.

20. sudo apt-get check

This command checks the package database for any inconsistencies. It’s a good idea to run this command regularly to make sure your package database is in good shape.

21. sudo apt-get dist-upgrade

This command upgrades all installed packages to their latest versions, including any new packages that may have been added to the repository. It’s a good idea to run this command regularly to keep your Raspberry Pi up to date.

22. sudo apt-get purge [package]

This command removes the specified package and any configuration files associated with it. It’s a good idea to run this command when uninstalling software that you no longer need.

23. sudo apt-get autoremove –purge [package]

This command removes the specified package and any packages that were installed as dependencies, but are no longer needed. It’s a good idea to run this command when uninstalling software that you no longer need.

24. sudo apt-get update && sudo apt-get upgrade

This command updates the list of available packages and their versions, and then upgrades all installed packages to their latest versions. It’s a good idea to run this command regularly to keep your Raspberry Pi up to date.

25. sudo apt-get dselect-upgrade

This command upgrades all installed packages to their latest versions, using the dselect package manager. It’s a good idea to run this command regularly to keep your Raspberry Pi up to date.

26. sudo apt-get clean && sudo apt-get autoclean

This command removes any downloaded package files that are no longer needed, and then removes any packages that were installed as dependencies, but are no longer needed. It’s a good idea to run this command regularly to free up disk space.

27. sudo apt-get update && sudo apt-get dist-upgrade

This command updates the list of available packages and their versions, and then upgrades all installed packages to their latest versions, including any new packages that may have been added to the repository. It’s a good idea to run this command regularly to keep your Raspberry Pi up to date.

28. sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade

This command updates the list of available packages and their versions, upgrades all installed packages to their latest versions, and then upgrades all installed packages to their latest versions, including any new packages that may have been added to the repository. It’s a good idea to run this command regularly to keep your Raspberry Pi up to date.

29. sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove –purge

This command updates the list of available packages and their versions, upgrades all installed packages to their latest versions, upgrades all installed packages to their latest versions, including any new packages that may have been added to the repository, and then removes any packages that were installed as dependencies, but are no longer needed. It’s a good idea to run this command regularly to keep your Raspberry Pi up to date and clean.

30. sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove –purge && sudo apt-get clean && sudo apt-get autoclean

This command updates the list of available packages and their versions, upgrades all installed packages to their latest versions, upgrades all installed packages to their latest versions, including any new packages that may have been added to the repository, removes any packages that were installed as dependencies, but are no longer needed, and then removes any downloaded package files that are no longer needed. It’s a good idea to run this command regularly to keep your Raspberry Pi up to date and clean.

31. sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove –purge && sudo apt-get clean && sudo apt-get autoclean && sudo apt-get check

This command updates the list of available packages and their versions, upgrades all installed packages to their latest versions, upgrades all installed packages to their latest versions, including any new packages that may have been added to the repository, removes any packages that were installed as dependencies, but are no longer needed, removes any downloaded package files that are no longer needed, and then checks the package database for any inconsistencies. It’s a good idea to run this command regularly to keep your Raspberry Pi up to date and clean.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?