Reboot Linux System Command

How do I reboot my Linux based system? How do I reboot a remote Linux system or server using command line?

Linux comes with various utilities that allow a system administrator to reboot, halt or poweroff the system. One must be root or a member of the wheel group to run reboot command. This page shows how to reboot Linux based system using the command line.

Linux system restart

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Linux
Est. reading time 1m
To reboot Linux using the command line:

  1. To reboot the Linux system from a terminal session, sign in or “su”/”sudo” to the “root” account.
  2. Then type “sudo reboot” to reboot the box.
  3. Wait for some time and the Linux server will reboot itself

Reboot Linux System Command
Let us see examples in details.

Reboot Linux system command

You must login as root user to reboot the system. Open the terminal application (or login to remote box using ssh client) and type any one of the following command to reboot the system immediately:
# /sbin/reboot
# /sbin/shutdown -r now
You can also use sudo command under Ubuntu/Debian/Fedora and other Linux based distros:
$ sudo reboot
It is a good idea to provide notification to all logged-in users that the system is going down and, within the last five minutes of TIME, new logins are prevented. Type the following command:
# shutdown -r +5
Sample output:

Broadcast message from
        (/dev/pts/1) at 13:21 ...

The system is going down for reboot in 5 minutes!

TIME may have different formats, the most common is simply the word “now” which will bring the system down immediately. Other valid formats are +m, where m is the number of minutes to wait until shutting down and hh:mm which specifies the time on the 24hr clock.

How do I reboot remote Linux server?

Simply login as the root user using ssh command:
$ ssh root@remote-server-com /sbin/reboot
$ ssh root@remote-server-com /sbin/shutdown -r now
Sample outputs:

Connection to remote-server-com closed by remote host.

Get notification using the ping command when remote-server-com comes online:
ping -a remote-server-com
It is possible to use sudo command along with normal user over ssh session too. The syntax is:
$ ssh -t vivek@remote-server-com /sbin/reboot
Without the -t you will seen an error “sudo: no tty present and no askpass program specified“, hence you must pass the -t to the ssh command.

A note about systemctl command when using systemd

Are you using systemd as init on your Linux distro? Most modern Linux distro such as Debian, Ubuntu, CentOS, RHEL, Fedora, Arch, and many uses systemd, and we can use the following command to reboot the system:
sudo systemctl reboot


This page demonstrated how to use reboot command on Linux to reboot the server or desktop for software and kernel updates.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 19 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
19 comments… add one
  • Matey Nov 27, 2008 @ 17:51

    Now the trouble is that my server is 90 miles away and does NOT respond to ssh (frozen) How can anyone reboot that sucker without traveling 180 miles (round trip)?
    It’s deep buried in some corporates server room too!
    I know it is doable but I like to know how!

  • Josh Feb 17, 2009 @ 18:43

    @Matey: You call someone there and ask them to reboot it. Or you install a smart PDU on your remote UPS and power cycle the outlet the server is plugged into.

  • nichole Jun 6, 2009 @ 7:32

    I have a VPS with no panel and I want to reboot my container, will this work as well, or will affect the entire node?

  • kashyap Jun 24, 2009 @ 4:02

    can a normal user reboot a server (assuming he knows the password)
    ssh sudo reboot

    does this work ( sorry to ask this but cant test it right now soo….)

  • wpns Nov 23, 2009 @ 14:35

    OK, I’ve got the following working for remotely rebooting a Linux (Centos, but should work elsewhere) system from an OSX machine (using Terminal).

    ssh -t /usr/bin/sudo /sbin/reboot

    /etc/sudoers has:


    at the end. You are supposed to be able to make

    username localhost=/sbin/reboot

    work, but I had to put the IP address in.

    REMEMBER to use visudo to edit the file, i to insert, to stop inserting, :write and then :quit to write and exit.


  • supi007 Mar 18, 2010 @ 9:58


    I have restarted my server remotely but now I cannot reach it. I try it on SSH but nothing. What could happen? I had given out the reboot command. Normally it only do a normal restarting. This is strange. Does anybody any idea?


  • wpns Mar 18, 2010 @ 20:15


    If you gave someone the reboot command they could easily transform it into the shutdown command, so it’s possible your machine has been powered off instead of rebooted. Gotta get someone to push the power button.

  • supi007 Mar 21, 2010 @ 9:24


    thank you for reply. I have got two NIC in my server in bond. The bond usually make the life easier but not for me :( When I had restarted my machine, something had gone wrong with the bond connection. I know because when I arrived home I coldnt get IP from my server therefore I had to check it directly on my server. After that I did an ifconfig eth0 down;ifconfig eth0 up and everything was fine again.
    Unfortunately it is not a solution in a major case when you far away 100 miles, but it was a good lesson for me. I’m going to remove the second NIC from my server…


    • Akshay Aug 27, 2012 @ 10:29

      I need help from U.

      I want to restrt the Redhat server 6.3 server.
      Which is locatedin different country.
      How to do that and is their any risk of doing it?
      If risk any solution for that.

  • atasözleri Apr 26, 2010 @ 14:42

    Thanks you, i am must the this code.

    Working nice.

  • Akshay Aug 27, 2012 @ 10:24

    Hi it means…
    Do we cant restart the server remotely.?

    I want to restart the server which is in different country.
    Can i restart that machine from SSH.
    If so what i shold do. It shold not be risk.
    I have root permision.

    • Eric May 14, 2013 @ 18:57

      1) login as root (or login and su to root),
      2) type (and hit return):
      /sbin/shutdown -r now

      It should tell you “SYSTEM IS GOING DOWN FOR REBOOT NOW”
      and after 20 seconds or so (during which it is shutting down services) it will reboot.

  • Cisco Aug 31, 2012 @ 15:33

    shutdown -r “now” shuts down server
    reboot “now” shuts down server
    cant reboot it. It only shuts down any Ideas

  • dee Nov 15, 2012 @ 2:42

    After I run the command # /sbin/shutdown -r now, my nagios gives an error below:

    Error: Could not read host and service status information!

    Any ideas?

  • William Smith Nov 15, 2012 @ 12:58


    Does it still reboot, or does it fail to reboot at all? Google sez that Nagios error is a Nagio configuration issue.

  • dee Nov 16, 2012 @ 6:52

    Hi William,

    Yes, it can still reboot. The error I have mentioned was on web access in nagios.
    I solved the issue by checking windows.cfg. I found out that there were two items that are typo error.


  • mosestaban Nov 18, 2015 @ 7:03

    step of reboot in command linux

  • B.K. Nov 1, 2016 @ 18:50

    You forgot another method to do a reboot. Not the recommended method, but when something has gone weird with your terminal, another way to get a reboot is:

    init 6

    Hope that helps.

  • Rubaida Mostofa Nov 21, 2016 @ 10:04

    How I can format VM server from main server?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum