-
Website
http://www.tech-recipes.com/ -
Original page
http://www.tech-recipes.com/rx/180/safely-reboot-a-linux-system/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
davak
83 comments · 1 points
-
Web Design
3 comments · 1 points
-
danishbacker
9 comments · 1 points
-
flexinfo
11 comments · 1 points
-
Tonychelle
4 comments · 1 points
-
-
Popular Threads
-
Facebook: How To Get Only Status Updates on Your FB Home Page
1 week ago · 4 comments
-
Firefox: Enable Case Sensitive Searches When Using Find (Ctrl+F)
4 days ago · 1 comment
-
Windows 7: How To Disable Live Preview for Taskbar Thumbnails
1 week ago · 2 comments
-
Gmail: How to block a sender from your inbox
2 weeks ago · 3 comments
-
Our first iPhone game GreenThumb available in the App Store
3 weeks ago · 2 comments
-
Facebook: How To Get Only Status Updates on Your FB Home Page
A lot of users forget to give the time argument and are then puzzled by the error message shutdown produces. The time argument is mandatory; in 90 percent of all cases this argument will be the word now.when i try to install mandrake 10 it says'you may safely reboot or halt your system'.what is this???
reboot
reboot</ul>
That is true. On Slackware Linux, both "halt" and "reboot" work. I know this is also true for OpenBSD.
If you'd like a user to be able to shutdown or reboot a machine, the easiest way to do this is through "sudo".
shutdown -rn now is how I usually reboot a machine of mine. shutdown -r by it's self will sync the disks, -n forces this (I like to be on the safe side).
halt just stops the processors and inits the system without syncing disks. You'll more than likely come back with your system running FSCK on your FS, and you better pray your using ext3.
If the system is not in run level 0 or 6 halt/reboot/poweroff calls shutdown
so halt is really just a wrapper for shutdown
don't believe me? man halt
shutdown -rn now is how I usually reboot a machine of mine. shutdown -r by it's self will sync the disks, -n forces this (I like to be on the safe side).
halt just stops the processors and inits the system without syncing disks. You'll more than likely come back with your system running FSCK on your FS, and you better pray your using ext3.</ul>
What type of idiot response is this. Have you ever heard of checking argv[0], it tells you how the process was called. Halt checks this and then runs according to how it was called.
if ((progname = strrchr(argv[0], '/')) != NULL)
progname++;
else
progname = argv[0];
if (!strcmp(progname, "reboot")) do_reboot = 1;
if (!strcmp(progname, "poweroff")) do_poweroff = 1;
Moral of this story "think before you open your mouth"