reboot: command to reboot a Linux/Unix machine

To restart liux /Unix machine ,you can use reboot command as a root . There are many options used with reboot command. With the help of these options we can halt,reboot and poweroff the linux machine.

==>If you want to halt the linux /Unix machine , you can use ‘–halt’ option with reboot command .

[root@localhost ~]# reboot –halt

==>If you want to poweroff the linux / Unix machine with reboot command ,you acn use ‘-p ‘ or ‘–poweroff’ option.

[root@localhost ~]# reboot –poweroff

==>If you want to Force immediate halt/power-off/reboot the linux / Unix machine ,you can use  ‘-f’ or ,’ –force ‘ option with reboot command.

[root@localhost ~]# reboot -f

Rebooting.

==>If you want to Only write wtmp shutdown entry in /var/log/wtmp, do not actually halt, power-off, reboot the linux machine, you acn use ‘-w ‘or ‘ –wtmp-only’ option with reboot command.

[root@localhost ~]# reboot -w
[root@localhost ~]#

==>If you don’t write wtmp record in /var/log/wtmp ,you can use ‘ -d’ or ‘–no-wtmp ‘ option with reboot command.

[root@localhost ~]# reboot –no-wtmp

==>If you don’t send wall message before halt/power-off/reboot,you can use reboot command witn ‘–no-wall  ‘ option.

root@localhost ~]# reboot –no-wall ” please save your work system reboot now”

All command line options  used with the ‘ reboot ‘ command are shown below

______________________________________________________________________________

Options                                                  Description

_______________________________________________________________________________

–halt                                         Halt the machine
-p    –poweroff                        Switch off the machine
–reboot                                     Reboot the machine
-f –force                                    Force immediate halt/power-off/reboot
-w –wtmp-only                          Don’t halt/power-off/reboot, just write wtmp record
-d –no-wtmp                             Don’t write wtmp record
–no-wall                                    Don’t send wall message before halt/power-off/reboot

_______________________________________________________________________________

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s