LINUX CLASSES - LINUX BASICS
Do I Have to Logoff and Shutdown My Linux PC?
Stop the System, I Want to Get Off!
If you're ready to cash in your console and call it a day, use the logout command. Entering
logout
at the command prompt exits your current user account and returns you to the log-in prompt. (The exit command does the same
thing as logout.) To log out from multiple consoles, use alt-Fn to switch between consoles and then log out from each one.
But note that even if you log out from all of your active consoles, Linux is still running.
If you were to power off your machine at this point, a voice from your computer would drone, "You have chosen unwisely!" The
floor would shake, and your PC would glow white hot while your hard disk melted into a pool of molten silicon. Just kidding . . .
sometimes the floor doesn't shake, but powering off a running Linux system without using the shutdown command will most
certainly cause Bad Things to happen to your hard disk. So if you really want to exit Linux, be sure that you're logged in as the root
user and enter the command
shutdown -h now
You'll see some messages indicating that various subsystems are being shut down, and then the computer will be reset. When you
see a message indicating that shutdown is complete, it's safe to turn off your PC.
Tip: Pressing ctrl-alt-delete will also safely shut down your Red Hat Linux system. Just remember to power off as soon as you see your PC's normal bootup screen. Note that some other Linux distributions will do a hard reset (which may cause filesystem
damage) instead of gracefully shutting down, so don't use ctrl-alt-delete on non-Red Hat systems unless you know it's safe.
Previous Lesson: Virtual Consoles
Next Lesson: Choosing a Shell
[ RETURN TO INDEX ]
Comments - most recent first (Please feel free to answer questions posted by others!)
Nazzareno ( 03 Jan 2012, 10:49)
In an redhat5, once shutdown the system with as root:
shutdown -h now
now, when I restart the system and connected as root then I have lost all
display tabs, i.e.: "Applications", "Places" and "System", so basically I
cannot use any display commands anymore through root user. On the contrary,
if I swift on another user, for example oracle, then I can see and work
fine all display commands. How can I fix this behavior and work fine again
with root user as?
santhoshkumar ( 17 Dec 2011, 03:43)
i need to shutdown my redhat linux in command method
but i would like to start automatically after sum some time what type of
command we used for that
pranab ( 16 Dec 2011, 09:38)
thanks
Vithu ( 29 Nov 2011, 00:53)
Thank you very very helpful....
theregkid ( 28 Oct 2011, 14:27)
.... i will never shutdown again... - cowers in fear-
amit ( 27 Sep 2011, 06:45)
thanks
Santhosh ( 02 Sep 2011, 10:18)
init 0 (to shutdown)
init 6 or reboot (to reboot)
in Redhot linux...
duvvuri ( 02 Jul 2011, 10:31)
there are other commands for turning off:-
(a) init
(b) poweroff
harmilap rahul ( 31 Mar 2011, 06:04)
this command are very useful now in my college
rahul singh ( 31 Mar 2011, 06:03)
this command are very useful...
constant_c ( 30 Mar 2011, 06:32)
If you want to shut down and then turn off the power, you can type
shutdown -P now
this shuts down the pc normally and after it turns off the power as well
zubair ( 21 Mar 2011, 04:35)
plz gv me a brief discription of grep command
Hakan ( 02 Mar 2011, 09:36)
As a newbie, I've been using the command "poweroff" version and now I
wonder if this is a non-standart command?
amy ( 20 Jan 2011, 15:05)
No doubt this is a very good site to know about linus. i have problem to
configure tomcat6. could you please add on tomcat6 details
Raj Narayan Verma ( 14 Dec 2010, 10:46)
Its very useful thanks
ravi ( 29 Nov 2010, 02:38)
disktop remote
AMAL ( 07 Nov 2010, 11:19)
thanku>>>>> very much
Jasbir Singh ( 11 Oct 2010, 06:38)
very goood site... thanks
dineshbabu ( 02 Sep 2010, 00:52)
thanks
jahirhuusain ( 16 Jul 2010, 04:46)
its very usefull,,, thanx to every one
vimal ( 08 Jun 2010, 22:49)
Please Notify me about new comments with explanations.
I welcome your comments. However... I am puzzled by many people
who say "Please send me the Linux tutorial." This website *is* your Linux Tutorial! Read everything here, learn
all you can, ask questions if you like. But don't ask me to send what you already have. :-)
NO SPAM! If you post garbage, it will be deleted, and you will be banned.
|
Share This With a Friend
|
 |
Copyright ©
by Bob Rankin
All rights reserved - Redistribution is allowed only with permission.