![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
To access the contents, click the chapter and section titles.
Complete Idiot's Guide to Linux
Filename Expansion: TabAs I said earlier, shells are not very ergonomic, and most people dont like to type commands or long pathnames very often. Depending on the shell of you use, you might have the ability to have the shell complete filenames and command names for you. The shell will do this whenever the portions of the path you specified cannot be confused for something else. To activate completion on bash, all you need to do is press Tab after youve typed enough characters. If you wanted a listing of the /usr/local/bin directory, you could type ls /u<Tab>/lo<Tab>/b<Tab>, and the shell will expand each of the paths for you, saving you some keystrokes. If the shell cannot complete the expansion because multiple completions are possible, hitting Tab again will list everything that could be a match. This is very useful if you have forgotten the name of a command. For example if you type l<Tab><Tab>, the shell will respond with a list of all the programs that begin with an l: [alberto@digital alberto]$ l<Tab><Tab> laser lesskey lkbib lockfile lpr last let lmorph logger lprm lastb lex ln login lptest lastcomm lha lndir logname ls latex lightning loadkeys logout lsattr lbxproxy lintopvf loadunimap look lsdev ld lisa local lookbib lynx ld86 lispmtopgm locale lout lz ldd listalias localedef lpq less listres locate lpqall.faces Exiting the ConsoleTo exit a console, issue the logout command. This command will end your session, clear up the screen, and return you to the login prompt. To restart the computer from the console, you can press Ctrl+Alt+Delete. If you are using a terminal emulator like kvt or xterm, you can simply close the window and exit your system as you did before. If you leave your system logged in (which might be a fine thing to do on your home machine), remember that anyone will be able to see and edit your files. However, never leave a root session open, as this could lead to fatal security problems or even catastrophic user errors. Typically, Linux systems are left running permanently and only shut down when required by an upgrade or some sort of software malfunction. Shutting Down a Linux BoxShutting down is a bit different from what you might be used to on your PC. Unlike DOS or some other systems, UNIX-like systems need to be shut down gently. Even when no one is logged in, there are a number of processes running. These processes need to be stopped properly, or bad things will happen. Shutting down is accomplished through the shutdown command. Before you can use the shutdown command, you need to have root privileges. This means that you need to log in as root prior to using the command. The shutdown command takes a number of arguments. These options specify how the system is going to be shut down and when. The required one in this case are -h, which stands for halt, and the keyword now, which specifies that the system should begin shutdown immediately. To shut down your system gracefully, on a root console, type the following: [root@digital root]# shutdown -h now Rebooting a Linux BoxRebooting is just a fancy name for restarting the computer. The shutdown command shown earlier can be used to reboot if you specify the -r option instead of the -h option. The -r option stands for reboot: [root@digital root]# shutdown -r now The easiest way to reboot the system is to simultaneously press the Ctrl+Alt+Del keys, taking the system through the reboot sequence. You can perform this action without being logged in the console.
|
![]() |
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |