Contents
hide
Here is a list of some useful Raspberry Pi commands that you may find helpful as a cheat sheet:
sudo apt-get update
: Update the list of available packages and their versions.sudo apt-get upgrade
: Upgrade installed packages to the latest version.sudo raspi-config
: Launch the Raspberry Pi configuration tool.df -h
: Show the available disk space on the system.free -m
: Show the available memory on the system.top
: Show the processes that are currently running on the system.ps aux
: Show all running processes and their resource usage.shutdown -h now
: Shut down the Raspberry Pi.reboot
: Restart the Raspberry Pi.nano
: Launch the Nano text editor.cat
: Display the contents of a file.grep
: Search for a specific string in a file.chmod
: Change the permissions of a file.
Here are top 50 Raspberry PI commonly used commands cheat sheet:
ls
β List the files in a directorycd
β Change the current working directorypwd
β Print the current working directorymkdir
β Create a new directoryrmdir
β Remove an empty directorycp
β Copy a file or directorymv
β Move a file or directoryrm
β Remove a fileman
β Display the manual page for a commandcat
β Concatenate and display the contents of a fileless
β View the contents of a file one page at a timeecho
β Output a message or valuegrep
β Search for a pattern in a file or streamfind
β Search for files matching a patternsort
β Sort the lines in a file or streamuniq
β Remove duplicate lines from a file or streamwc
β Count the number of lines, words, and bytes in a filechmod
β Change the permissions of a file or directorychown
β Change the owner of a file or directoryecho $PATH
β Display the directories in the search pathecho $SHELL
β Display the name of the current shellecho $USER
β Display the current user's usernameecho $HOME
β Display the current user's home directoryecho $HOSTNAME
β Display the current hostnamedate
β Display the current date and timecal
β Display a calendaruptime
β Display the uptime of the systemwhoami
β Display the current user's usernameid
β Display information about the current usergroups
β Display the groups to which the current user belongstop
β Display the top processes by CPU or memory usageps
β Display a list of processeskill
β Terminate a processshutdown
β Shut down or reboot the systemreboot
β Reboot the systeminit
β Change the system runleveldmesg
β Display the system message bufferlsmod
β List the currently loaded kernel modulesmodprobe
β Add or remove a kernel moduleifconfig
β Configure a network interfaceip
β Display or manipulate network settingsroute
β Display or manipulate the routing tableping
β Test a network connectiontraceroute
β Trace the route to a hosttelnet
β Connect to a remote host using the Telnet protocolssh
β Connect to a remote host using the SSH protocolscp
β Copy files between two hosts using the SSH protocolsftp
β Transfer files between two hosts using the SFTP protocolftp
β Connect to a remote host using the FTP protocolwget
β Download a file from the internetcurl
β Transfer data using various network protocolsapt-get
β Install, update, and manage packages