Book-bot.com - read famous books online for free

Debian GNU/Linux : Guide to Installation and Usage by John Goerzen;Ossama Othman
page 73 of 298 (24%)

It's a bad thing to just press the power switch when you're done using the
computer. It is also bad to reboot the machine (with the Reset button)
without first taking proper precautions. The Linux kernel, in order to
improve performance, has a disk cache. This means it temporarily stores
information meant for permanent storage in RAM. Because memory is
thousands of times faster than a disk, this makes many file operations
move more quickly. Periodically, the information Linux has in memory is
actually written to the disk. This is called syncing. In order to turn off
or reboot the computer safely, you'll have to tell the computer to clear
everything out of memory and put it in permanent storage.

To reboot, just type reboot or press Ctrl-Alt-Del (that's Ctrl, Alt, and
Delete).

To shut down, you'll have to log in as root. As root, just type the
command shutdown -h now. The sytem will go through the entire shutdown
procedure, including the sync command, which clears the disk cache as
described above. When you see System halted, it's safe to turn off the
computer. If you have Advanced Power Management (APM) support in your
kernel and BIOS, the computer might shut itself off and save you the
trouble. APM is common in laptops and is also found in certain desktop
mainboards.

The Basics

It's now time to explore the system in more detail. You've seen how to log
in and shut down the system. In this chapter, we explore the Linux comand
line, how Linux deals with files and directories, and some basics on
identifying yourself to others.
DigitalOcean Referral Badge