Unix/Linux Go Back    

UNIX for Dummies Questions & Answers This forum is closed for new posts. Please post beginner questions to learn unix and learn linux in this forum UNIX for Beginners Questions & Answers

various restart commands ?

UNIX for Dummies Questions & Answers

Thread Tools Search this Thread Display Modes
Old Unix and Linux 09-04-2002
champion champion is offline
Registered User
Join Date: Jul 2002
Last Activity: 15 November 2005, 5:10 AM EST
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
various restart commands ?


i am running a Sun Solaris 8 Sparc machine.

i would like to know the differences between the following commands :

1) init 6
2) reboot
3) shutdown -y -i6 -g0

any other machine restart commands (for multi-user mode)?

pls help me.

Sponsored Links
Old Unix and Linux 09-05-2002
wolk wolk is offline
Registered User
Join Date: Aug 2002
Last Activity: 20 April 2004, 1:37 AM EDT
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Check the man pages(man <command>)
I just had a look and it seems to me that shutdown is bringing the system down in civilized kind a way, it sends the info to users and so on and so on, but at the end it cals init 6 any way.
I'm running RH linux so i don't know a thing about solaris, but it want hurt to check /etc/inittab - that seems to be a config file for init.

see yaa mate
Sponsored Links
Old Unix and Linux 09-05-2002
Perderabo's Unix or Linux Image
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
Join Date: Aug 2001
Last Activity: 26 February 2016, 12:31 PM EST
Location: Ashburn, Virginia
Posts: 9,931
Thanks: 64
Thanked 465 Times in 269 Posts
On solaris, "shutdown -i6 -g0 -y" is very close to "init 6". But with shutdown, you could have used -g60. You can't do that calling init directly. The reboot command basicly just invokes the uadmin system call. It is a rough shutdown, but it is a bit better than just letting power drop so it might be used by a ups with only a few seconds of battery power or something.

I prefer the shutdown command. A SunOS dude tried the init thing on HP-UX...which is a very bad move. HP has a poor inittab structure and changing run levels via init will bypass the shutdown scripts. So (I think) the shutdown command may be more universal. But my universe is just SunOS and HP-UX...
Old Unix and Linux 09-05-2002
Kelam_Magnus's Unix or Linux Image
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
Join Date: Aug 2001
Last Activity: 18 April 2013, 3:03 PM EDT
Location: San Antonio, TX,
Posts: 1,070
Thanks: 0
Thanked 5 Times in 5 Posts
I agree with Perderabo.

The only time I really use reboot is when I am in Single user mode and need to reboot to get to multi. There may be other cases, but that's it for me.

Regarding init I can't think of the last time that I used it for anything. I occasionally use it for going from multi to init 4 to test scripts that I have written and then come back to init 3 for multi. Sometimes I will use it to go to init 2 and then patch my boxes before rebooting (shutdown -ry now).

I most situations for taking down a system shutdown is the only way to fly. Linux

man 1m shutdown

Sponsored Links
Old Unix and Linux 09-06-2002
pbonilla pbonilla is offline
Registered User
Join Date: Aug 2002
Last Activity: 3 February 2012, 3:50 PM EST
Location: arizona
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
to bring down the system CLEAN, you need to accomplish 3 things
Sync memory to disk
unmount all file systems
Kill a processes cleanly (not Kill -9)

Init 6 does all three by using run control scripts (RC#)
shutdown call on the init comman to shutdown(default is s init 3 but can bu substituted by using the -i option)
reboot does not call on init command and can cause a memory dump or currupt your file system.

hope this helps

Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Any Restart Script? ademah Shell Programming and Scripting 5 06-25-2009 06:05 AM
Can BASH execute commands on a remote server when the commands are embedded in shell bash_in_my_head Shell Programming and Scripting 1 12-04-2008 01:51 AM
code that reads commands from the standard i/p and executes the commands Phrozen Smoke Programming 4 01-22-2007 02:06 AM
sshd restart ashterix AIX 2 11-28-2005 11:50 AM
its happend after restart. onlytorobin Shell Programming and Scripting 3 10-01-2004 08:43 AM

All times are GMT -4. The time now is 08:38 PM.