best way to reboot ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting best way to reboot ?
# 1  
Old 11-07-2008
best way to reboot ?

Hi

What is the best way to reboot a Linux computer?
i) Press the power switch
ii) type 'init 6' as any user, then enter the root password when prompted
iii) Pour metal filings in the top of the computer.
iv) su to root then type 'init 6'
# 2  
Old 11-07-2008
Or you could just type
Code:
reboot

as root.
# 3  
Old 11-07-2008
halt
poweroff
reboot
shutdown
# 4  
Old 11-07-2008
Quote:
Originally Posted by lijiajin
halt
poweroff
reboot
shutdown
Well, you got 1/4 correct. He asked the best way to 'reboot'.
# 5  
Old 11-07-2008
i typically use
Code:
shutdown -y -g0 -i6

I don't know if that's correct or not...it's just what I've gotten used to.
# 6  
Old 11-07-2008
if you use gnome
Code:
gnome-power-cmd.sh reboot

as plain user
# 7  
Old 11-08-2008
Quote:
Originally Posted by tjay83
What is the best way to reboot a Linux computer?
i) Press the power switch
ii) type 'init 6' as any user, then enter the root password when prompted
iii) Pour metal filings in the top of the computer.
iv) su to root then type 'init 6'
- "shutdown" is an executable script. Read it to see what the script exactly is calling. In most cases "shutdown" first does a check on running processes and mounts, and then cleanly shuts them down before sending the reboot signal to the kernel by means of an "init 6" command.
You may read "man init" as well, to see what parameters "init" uses.

The "reboot" command may differ from one system to the other.
- "reboot" on Solaris is a binary. Reboot warns all logged on users, performs a sync to disk(s), then hands it over to "init" (which does the actuale rebooting of the system). On Linux systems, "reboot" may be a script, I don't know that for sure.
- "poweroff" in Solaris is a command you use after the disk(s) have synced. It eventually shuts off the power on the hardware. So no reboot here.
- The halt and poweroff utilities normally log the system shutdown to the system log daemon, syslogd, and place a shutdown record in the login accounting file. (I snatched that from Solaris' "man halt").
N.B. On Solaris the "halt" and "poweroff" utils do not cleanly shutdown the smf services (running processes). So you might check this in Linux.

On Solaris (and also some Linux systems) you also can directly use the "init [0123456] commands, but beware: "init 5" means something else on Solaris as in Linux.

- DON'T press the powerswitch for a reboot. I haven't heard of any operating system that appreciates this action.

Cheers, A
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Server reboot

Hi, The server got rebooted and below messages can be seen in /var/log/messages Sep 7 10:49:12 minersville kernel: Call Trace: <IRQ> <ffffffff80167420>{__alloc_pages+796} Sep 7 10:49:12 minersville kernel: <ffffffff80182814>{kmem_getpages+106} <ffffffff80183c16>{fallback_alloc+304}... (3 Replies)
Discussion started by: admin_db
3 Replies

2. AIX

Reboot VIO - OK?

We've got two datacenters and in every datacenter 2 VIOs. The VIO manages the I/O of the LPARs. So: Is it possible to reboot the VIO without shuting down an LPAR:wall: (4 Replies)
Discussion started by: DiViN3
4 Replies

3. Shell Programming and Scripting

Two scripts after reboot

I have two scripts: scriptone.sh & scripttwo.sh I need to schedule them to run scriptone.sh then scripttwo.sh after the servers is rebooted ( only first reboot ) OS: AIX 6.1 (4 Replies)
Discussion started by: Sara_84
4 Replies

4. AIX

update w/o reboot

Hi, The apar instructions is to reboot on the ibm site. Is there's a way to update apar w/o reboot? I think I heard something before that it's possible. Thanks in any idea you will type... (1 Reply)
Discussion started by: itik
1 Replies

5. HP-UX

Reboot After Panic

Hi all, Does anybody know what kinds of events can prompt the following? I found our test db box had rebooted itself. I'd like to know how I can go about finding our why. Thanks folks... (1 Reply)
Discussion started by: Kozmo
1 Replies

6. Solaris

system self reboot

dear all, I have 2 T2000 with solaris 10 and oracle 10g installed on it. these two servers are rebooted by itself. could anyone help me investigate the cause. the message log is attached thanx, (3 Replies)
Discussion started by: fsmadi
3 Replies

7. UNIX for Advanced & Expert Users

Can I reboot SunBlade150 from CD?

I have a SunBlade 150 sparc machine. I get this box without root password. When I truned on the machine and typed ctrl -D to run under normal mode. The file system couldn't be mounted. If I don't care about current system and files on the machine and want to rebuild this box with solaris 10. Can I... (13 Replies)
Discussion started by: duke0001
13 Replies

8. Solaris

different between soft reboot and hard reboot

Hi Guru's Can any want here could explain to me the different between soft reboot and hard reboot . Best Regards Seelan (3 Replies)
Discussion started by: seelan3
3 Replies

9. UNIX for Advanced & Expert Users

coredump after every reboot

Every time I reboot our solaris 9 (SunOS 5.9 Generic_118558-19 sun4u sparc SUNW,Sun-Fire-480R) box, I get the messages below: # dmesg | grep dump Mar 24 12:39:55 hostname savecore: initial dump header corrupt Mar 24 12:39:55 hostname genunix: dump on /dev/dsk/c1t0d0s1 size 700 MB Mar 24... (2 Replies)
Discussion started by: xnightcrawl
2 Replies

10. UNIX for Dummies Questions & Answers

reboot

Hi all, Quick question. Does anyone know what is the compination of buttons that I have to press to stop the start up so I can bring the system in a single user mode? I use HP Vis 9000 Thanks alot (1 Reply)
Discussion started by: guest100
1 Replies
Login or Register to Ask a Question