2.9. Moving Around the System

2.9. Moving Around the System

When you enter the operating system, it launches a unique environment for each user. The environment comprises user directories, configurations, and a command shell.

User directories are located in the /home directory and are named by the user's name. For example, the full name of the root user's directory is /home/root/. The files of the root user are stored in this directory.

When a user enters the system, his or her directory becomes the current directory. Thus, when the root user enters the system, the /home/root directory becomes the current directory, and all commands will be executed in this directory until another directory becomes current.

There are several command shells in Linux, and each of them offers specific features. I will consider the Bourne Again Shell (bash), because it is the one used most often.

When I was only cutting my teeth on Linux, after I installed it for the first time, I could not turn it off correctly for a long time because I did not know what command to use to do this. I borrowed a Linux reference book from an acquaintance to find out how to power down the system properly. The description of the power-off procedure, however, was buried in the depths of the book, and it took me about a month to read through to it. During all this time I powered off the system by turning off the computer.

So that you do not go through the same process, here is how to power down the system. This is done using the shutdown command. The command takes several parameters, the two most commonly used of which are -r to reboot and -h to halt the computer after the shutdown. Also, the time, at which to shut down the system, must be specified at the end of the command.

For example, to reboot the system right away, enter the following command:

 shutdown -r now 

To shut down the computer immediately, enter this command:

 shutdown -h now 

Do not shut down the computer in any other way; always use this command. Powering down the computer using the power button on the system block is fraught with the danger of losing data that were loaded into the memory but not saved to the disk.

If you want to enter the system under another name while working in the text mode, you can do this with the help of the exit command.

To exit the system when working in the graphical mode, click the main menu button and select the Log Out item. This will unload the graphical shell, after which the login screen will be displayed, in which you will be able to enter the system under another name or reboot the computer.



Hacker Linux Uncovered
Hacker Linux Uncovered
ISBN: 1931769508
EAN: 2147483647
Year: 2004
Pages: 141

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net