Hardware Reference
In-Depth Information
Using Shutdown and Restart
Commands
When you start a Raspberry Pi, the device follows a set of instructions to load the OS.
Similarly, when you shut it down, it should follow a set of instructions to shut down
the OS in such a way that the ile system stored on the SD card stays complete and
uncorrupted. It is therefore very important that you don't simply remove the power
supply but make sure you always instruct the OS to shut down safely. From the GUI,
you can simply use the Shutdown icon on the desktop to shut down the Raspberry Pi,
as described in Adventure 1. Alternatively, from the LXTerminal, you do this by using
the shutdown command.
First, make sure that you close any open applications. After all applications are closed,
type the following command to start the shutdown process from the command line:
sudo shutdown -h now
he -h option in this command stands for halt . When the system is “halted”, it is safe
to remove the power.
Sometimes, you might simply want to restart the OS. he following command, with
the -r ( restart ) option, will shut down and then restart the Raspberry Pi:
sudo shutdown -r now
Continuing Your Text
Adventure
To learn more about commands and using terminals in Linux, click on the Debian
Reference shortcut on the desktop of the Raspberry Pi and explore the information in
that program. To recall or review the commands in this chapter, refer to the following
Quick Reference Table.
Command Line Quick Reference Table
Command
Description
cat
Displays the contents ( catalog ) of the text ile.
Change directory. For example, the command cd Desktop
moves you into the Desktop directory.
cd
Move you up the directory tree to the parent directory.
continued
cd ..
Search WWH ::




Custom Search