sudo shutdown -h 03:14
Maybe you need to shutdown your Pi, but not yet! This command lets you schedule a time for your Raspberry Pi to turn off. In the example code, the Raspberry Pi will turn off at 3:14am. Change the hour and minute to reflect your desired shutdown time. You’ll need super user privileges to make this happen.
The halt command tells the Raspberry Pi to cease all CPU functionality before shutting itself down. It's different from other power down commands in that it halts the CPU prior to shutting down. Use the
sudo prefix to initiate this command!
The cd command stands for "change directory" and it does exactly what you think it does. If you need to switch to a different folder, just enter this command and replace "/folder1/folder2" with the complete path to your desired directory location.
Are you looking for something in particular? Use this command to list the files in your current directory.
Some commonly used flags are
-lha. This will list all files in the directory (including hidden files starting with a dot), and it will display the file size in a human readable way.
sudo find / -name file.txt
Do you need a specific file? Use this command to locate it! Replace "file.txt" with the desired file name. Be sure to include the file extension.
This command works best when running as administrator. Use
sudo to make sure the search includes protected folders.
If you're looking for a certain type of file, it can speed up your search to include
sudo find / -name file.txt -type f
sudo find / -name somedir -type d
And if you're looking for a pattern you can always use wildcard search:
sudo find / -name file.*
sudo mv ~/file /folder1/folder2/
The mv command is perfect for moving files from one directory to another. You'll need to use the
sudo prefix to ensure the command goes through.
In the example provided, replace "~/file" with your desired file name and "/folder1/folder2/" with your desired destination path.
Note: In this example, the
~ represents the current users home directory.
The man command is an abbreviation of the word manual. This command allows you to access the manual page for a given file, comman1d, or function. Replace the “command/function/file” from our example with your desired data. For example, run “man man” to view the man manual page.
This is the command you need to access the Raspberry Pi Configuration Menu. This menu allows you to modify many different areas of the Pi and you will need admin capabilities to use it. Be sure to use the
sudo prefix to access this menu.
sudo ifconfig -a
This command lists out crucial network information. Perfect for setting up network features or troubleshooting. You'll need admin rights to run this command, be sure to add
Need to ping an IP address? Maybe you're troubleshooting or just want to make sure you still have an internet connection. Whatever the case, all you need is to replace the IP address from the example with the destination IP of your choosing.