How do I reboot my HP Linux server using command line option? How do I remotely reboot my CentOS or Debian based Linux server?
You can use the reboot or shutdown command under Linux to saftly reboot the desktop or server system. These utilties performces the following operations:
- Flush cache to disk.
- Log reboot action including entering a shutdown record into the user accounting file called /var/run/utmp and /var/log/wtmp .
- Kill all process with a SIGTERM single followed by a SIGKILL single.
- Finally, reboot the server.
reboot command example
First, login as the root user. Type the following command to immediately reboot the system:
# reboot
Please note that if you are not the root user, you will get the message 'must be superuser. So login using sudo or su and than type the reboot command.
shutdown command example
Normally, the shutdown command is used and recommended for rebooting the system. This command can give users advance warning so that they can save their work and cleanly terminating specific programs. The syntax is as follows:
shutdown -r time "message"
Where,
- -r : Reboot the system.
- time : When to reboot. You can reboot immediately or after 2 minutes. It can be an absolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour (in wo digits). Second, it can be in the format +m, in which m is the number of minutes to wait. The word now is an alias for +0.
- message: Send warning message to send to all users.
Steps to reboot the system
Use the following command to reboot system immediate as root user:
# shutdown -r now
OR
# shutdown -r +0
Task: Reboot with warning message (recommended)
To reboot system in 5 minutes with the following warning message:
# shutdown -r +5 "Server is going down for kernel upgrade. Please save your work ASAP."
Task: See log of system reboot
The last reboot command will show a log of all reboots since the log file was created under Linux, enter:
# last reboot
Sample outputs:
Taks: Reboot remote Linux server
Use SSH client for logging into a remote Linux machine and for executing reboot commands on a remote Linux system as follows:
ssh root@server1 /sbin/reboot
OR
ssh root@server1.cyberciti.biz /sbin/reboot
OR
ssh root@192.168.1.2 /sbin/reboot
OR
ssh root@server1.cyberciti.biz /sbin/shutdown -r now
A note about GUI option
To reboot the desktop system based upon Gnome:
Click on System > Shutdown > Reboot
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop














{ 1 comment… read it below or add one }
or with magix key
alt+sysRQ+ r
alt+sysRQ+ e
alt+sysRQ+ i
alt+sysRQ+ s
alt+sysRQ+ u
alt+sysRQ+ b
https://en.wikipedia.org/wiki/Magic_SysRq_key