System Administration
Showing results for 
Search instead for 
Did you mean: 

reboot and shutdown the servers

Go to solution
Respected Contributor

Re: reboot and shutdown the servers

Hi Shiv,

You can issue
#shutdown -r -y 0 to reboot the server.

#shutdown -h -y 0 to shutdown & halt, so that you can power off.

It is good practice to take configuration file backups in regular interval, so that in case of any problem, you can recover. Also take ignite image in regular interval for critical servers, so that you will have a working known setup always.

You can give shutdown permission for any user by adding the user to /etc/shutdown.allow file.

Always shutdown all the applications like Oracle, SAP etc... before issuing shutdown command.


.... See invisible, feel intangible and achieve impossible as everything is possible ....
Honored Contributor

Re: reboot and shutdown the servers

Hi Shiv,

A graceful shutdown is the best way of shutting down any servers including HP-UX. It will allow all processes to clean their junks up. Also, it is good to broadcast message to users logged into the system with "wall"

# shutdown
# reboot -h [Shut down the system and halt]
# reboot -r [Shut down the system and reboot automatically (default)]
# reboot -t time [Specify what time reboot will bring the system down]

# man 1M reboot
# man shutdown

will always help you.

"A ship in the harbor is safe, but that is not what ships are built for"
Honored Contributor

Re: reboot and shutdown the servers


it is preferrable in most cases to use "shutdown" command to reboot the server!

This way you sure all your scripts runs gracefully in shutting down the different processes..

kind regards
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Cem Tugrul
Esteemed Contributor

Re: reboot and shutdown the servers

Hi Shiv,
As an additon to other replies please
take a look;

Good Luck,
Our greatest duty in this life is to help others. And please, if you can't
Devender Khatana
Honored Contributor

Re: reboot and shutdown the servers


shutdown is the only command used for proper shutdown. The options defined will be based on your requirements like if you wish to reboot, halt or boot to single user mode.

reboot should never be used unless you have changed the kernel and is rebooting to boot of the new kernel. When doing kernel changes through SAM as well reboot is used which inturn does a reboot as the kernel itself has changed.

My favourite to shutdown and halt an HPUx system

#shutdown -hy 0

Apart from root the shutdown authorization can be given to any common user by putting a entry of that user name in file /etc/shutdown.allow

I also used to prefer a special user for shutdown purposes if your shutdown is executed allmost everyday and users are not much capable. In that case I used to put the shutdown command in the .profile with proper options.

Impossible itself mentions "I m possible"
Raj D.
Honored Contributor

Re: reboot and shutdown the servers

Shiv ,

In short we use :
# shutdown -r -y 0
(for reboot).

# shutdown -h -y 0
(for shutdown)

And it works perfect without any problem.

" If u think u can , If u think u cannot , - You are always Right . "