Stephen F. Bosch wrote:
> Claus Atzenbeck wrote:
>
> > > before. Any ideas? Also, from console, what the hell is the shutdown
> > > command??
> >
> > "reboot" or "halt"
>
> reboot will reboot the machine =)
shutdown will also reboot the machine, if the correct option is specified;
although, for this, reboot is a "shortcut" and therefore what's typically
used. If not mistaken, then I believe reboot is "mapped" to shutdown (with
"-r now" as the options, I believe).
reboot
is equivalent to
shutdown -r now
DOCUMENTATION:
However, for the newbie who asked what shutdown is, and the real point of
this reply, when dealing with a Unix/Linux command, just do a man on the
command as follows:
% man shutdown
% man reboot
% man cp
etcetera.
("%" is to represent the command line prompt, and it could be different,
depending on how the prompt is defined.)
man is for displaying the manual pages for commands and there are other
documentation tools or utilities on Linux, such as xman, which brings up a X
gui for man, with menus to make searching easier, especially for newbies.
man won't work for all commands, because not everything is in man; however,
all core Linux/Unix commands should be there, and you'll eventually find
other things included in man, such as related to Perl.
E.g.,
% man perl
There's also the info tool on Red Hat, and probably Mandrake, however I
haven't played around with this tool enough yet to know it thoroughly.
If using KDE, then many commands can be searched for through the main
KDE Help menu or utility, which has a web browser kind of u.i. (user
interface). KDE Help allows searching through KDE proper documentation, as
well as man pages, and possibly other sources.
If using GNOME, then I don't know if the newer version of GNOME provides a
Help tool, but users should look for one and can certainly run man in a
terminal window.
Read the documentation which comes with the system and packages. There's
much documentation under /usr/doc. Bring up a browser like Netscape or
KDE FM and peruse the directories under /usr/doc. (emacs and gvim can also
be used.)
There's also the Linux Documentation Project, which provides an abundance of
documentation freely accessible over the internet. I don't recall the url,
however it can be found through many Linux web sites, including Mandrake's at
http://www.linux-mandrake.com and Red Hat's web site at http://www.redhat.com
To get up to speed more quickly with Linux/Unix commands, O'Reilly publishes
a Nutshell book which isn't expensive and is fairly, or entirely,
comprehensive. However, this kind of information can also be found on the
web.
Get accustomed to using the documentation; it's an essential skill for anyone
planning on earning a living with any operating system and tools.
WARNING:
If a user doesn't know what shutdown is for, then be VERY CAREFUL when
working as the superuser or root, which is often the only way shutdown and
reboot work.
If you're networked, then you want to make sure control over who can and
cannot reboot or shutdown your system is properly defined. The defaults
should be correctly set, though.
ADDITIONAL GIBBERISH:
If you don't have important, unbacked up files, on your system, or in the
configuration you're working in, then, what the hell, experience really,
effectively, burns in knowledge or understanding. However, the superuser,
i.e., root, or anyone with adequate root (superuser) privileges, can
obliterate an entire system with one command
% rm -fr /*
This would remove everything under the root directory, which means /boot,
/usr, /root, /home, /var, /tmp, /mnt, /etc, /usr/local and /usr/src, while
leaving the user with a system that cannot be rebooted or shutdown using the
reboot and shutdown commands, because /bin and /sbin would also be gone
(everything would be gone). The user would need to reboot and reinstall the
system, or restore it from backup if a complete backup was made and stored on
a separate filesystem or medium.
Also, I'm not 100% certain of this, however if rm -fr follows symbolic links,
then any other filesystems mounted under /mnt would also be entirely erased.
I won't check, now, but if the command wouldn't or doesn't follow symbolic
links, then this additional loss wouldn't happen. I don't think rm -fr
follows symlinks, but this total effect could happen by using rm with another
option, or in combination with the find command (little less easy using
find).
The last paragraph is a little extra, only to indicate that there's nothing
the superuser cannot do, with respect to the immediate configuration and
mounted filesystems.
Users can certainly experiment with this on their own, personal, systems, but
it could be a sure way of being fired from a job.
READ the documentation if you're new to Linux, which also means having no
prior knowledge with Unix. Even seasoned gurus refer to the documentation
when they're unsure of something.
ALSO, all newbies should try to remember to create a separate user account,
without superuser privileges which could permit a user to destroy a system or
configuration. By far mostly work through this account, only using the
superuser/root account when absolutely necessary.
Otherwise, use the documentation accessing through other means, to figure out
how to restore destroyed or corrupted configurations.
Once a user is adequately familiar with the privileges root implies, then a
user can work as root all of the time without having a problem, however the
slightest distraction and error in command expression could require hours of
work to restore the configuration. I'm familiar with root privileges, and
worked constantly as root for an entire year, once (years ago); however,
recently did something which reminded me that sooner or later, one is bound
to make a mistake.
Experience really helps to burn in knowledge and understanding, but it can
also be a pain in the neck. On the other hand, there's always the expression
"no gain without pain" one could refer to.
Beefed up the reply with respect to the importance of using the
documentation, because if someone doesn't know what shutdown is, then they
likely also don't know many other things about Linux and Unix, or even
operating systems in general. Use the documentation.
mike