Updated: 11 October 2026 · Applies to: Linux with systemd 257 (Debian 13) and AlmaLinux 10.2; Ubuntu 24.04 (sudo 1.9.15p5) and 26.04 (sudo-rs 0.2.13); PuTTY 0.85 and the OpenSSH client on Windows, macOS and Linux
The Linux command to reboot is sudo reboot. Run it in a terminal on the machine, or after you connect to a server over SSH (with PuTTY, Windows Terminal or any terminal), and the system restarts straight away. You can also send it in one line from your own computer:
sudo reboot # on the server ssh -t admin@203.0.113.10 'sudo reboot' # from your computer, in one step
If you are logged in as root, leave out sudo. Your SSH session closes as soon as the reboot starts: wait one or two minutes, then connect again. Restarting Windows from Command Prompt instead? The command there is shutdown /r /t 0: see restart Windows from Command Prompt.
Linux restart commands at a glance
sudo reboot,sudo systemctl rebootorsudo shutdown -r now: reboot now. On Debian 13 and AlmaLinux 10,reboot,shutdown,poweroffandhaltare all links tosystemctl, so they do the same thing.sudo shutdown -r +5 "Kernel update, back in 2 minutes": reboot in 5 minutes and warn logged-in users.sudo shutdown -r 23:30: reboot at 23:30 server time (24-hour clock).shutdown --showshows a pending reboot;sudo shutdown -ccancels it.sudo poweroff: switch off instead of restarting. Compare them in shutdown, poweroff, halt and reboot commands.
1. Reboot a Linux server with PuTTY (Windows)
- Download PuTTY from its official page, chiark.greenend.org.uk (0.85 at the time of writing), and start it.
- Under Host Name (or IP address) enter the server IP address, choose SSH as the Connection type, leave Port at 22 unless your server uses another one and click Open. Full steps: access your server or VPS with PuTTY; for a custom port see connect to SSH on a different port.
- Log in as
rootor as a user with sudo rights. - Type
sudo reboot(orrebootas root), press Enter and give your password if sudo asks for it. - PuTTY then closes the window or reports that the server closed the connection, for example
Remote side unexpectedly closed network connection. That is expected. - After a minute or two, reconnect: right-click the PuTTY title bar and choose Restart Session, or start PuTTY again and open your saved session.
2. Reboot over SSH from Windows Terminal, macOS or Linux
Windows 10 (version 1809 or later), Windows 11 and Windows Server 2019 or later include Microsoft’s OpenSSH client, so ssh works in PowerShell and Windows Terminal without PuTTY. macOS and Linux have it built in.
ssh root@203.0.113.10 reboot
Or in one step, as a normal user with sudo rights: ssh -t admin@203.0.113.10 'sudo reboot'. The -t option gives the remote command a terminal so that sudo can ask for your password. Without it, sudo refuses. Ubuntu 24.04 says:
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Ubuntu 26.04, which uses sudo-rs, says sudo: A terminal is required to authenticate. When the reboot starts, the OpenSSH client prints Connection to 203.0.113.10 closed by remote host.
3. Schedule or cancel a reboot
Output on Debian 13 (systemd 257):
$ sudo shutdown -r +5 "Kernel update, back in 2 minutes" Reboot scheduled for Sat 2026-10-10 04:57:10 UTC, use 'shutdown -c' to cancel. $ sudo shutdown -c $ shutdown --show No scheduled shutdown.
shutdown -r without a time does not reboot at once: in our test it scheduled the reboot one minute later. Errors you may see:
Call to Reboot failed: Access denied: you ranrebootorsystemctl rebootas a normal user. Usesudo reboot.Failed to parse time specification: 25:00: the time must benow,+minutesorhh:mm.
4. Reboot a Linux desktop or laptop
On a desktop where you are logged in at the screen, reboot or systemctl reboot usually works without sudo. systemd’s polkit policy (org.freedesktop.login1.reboot) allows the reboot for the active local session (allow_active is yes) but asks for administrator authentication from any other session, such as SSH (auth_admin_keep). On a server without polkit, a normal user simply gets Access denied.
5. Restart a service instead of the whole server
After changing a configuration file you rarely need a full reboot. Restart only the service: sudo systemctl restart nginx (or apache2, httpd, mariadb), then check it with systemctl status nginx. Many services also accept sudo systemctl reload nginx, which asks the service to reread its configuration without a full restart. See list services and check their status with systemctl. A reboot is needed after a kernel update or when the system is stuck.
6. Check whether a reboot is needed, and that it happened
- Ubuntu and Debian: after an update that needs a restart (such as a new kernel), the file
/var/run/reboot-requiredexists and contains*** System restart required ***;/var/run/reboot-required.pkgslists the packages. On Ubuntu this file is written by the update-notifier-common package. - AlmaLinux, Rocky Linux, RHEL:
sudo dnf needs-restarting -rprintsReboot is required to fully utilize these updates.and exits with code 1 when the kernel, glibc, systemd, dbus, linux-firmware or the CPU microcode was updated since boot. Otherwise it printsReboot should not be necessary. - After reconnecting,
uptime -sprints when the system last started (for example2026-09-29 06:29:22),uname -rthe running kernel andjournalctl --list-bootsthe recorded boots. See check the kernel version and whether a reboot is pending.
7. If the server hangs or does not come back
- If services hang during shutdown,
sudo systemctl reboot --forcereboots without stopping services one by one; according to the systemd manual it still kills all processes and unmounts or remounts file systems read-only. Use it only when a normal reboot does not finish. - If you cannot reconnect after five minutes, PuTTY’s
Network error: Connection timed outmeans the server does not answer at all, whileConnection refusedusually means the server is up but SSH is not listening on that port or a firewall rejects it. - On a Ucartz VPS, use the reboot and power controls in the client area (reboot your VPS from the client area) or open the VNC console to see what the server shows. On a dedicated server: reboot your dedicated server from the client area.
More ways to reboot from the command line: how to reboot Linux using the CLI.
Ucartz services for this topic
- Hire an expert: engineers per 15 minutes, per hour or per month, with no contract.
- Server management: on-demand administration, hardening, migrations and monitoring.
