The Core Architecture Reinitialization Vector
When managing a headless Ubuntu server deployed in a remote data center, executing a physical power cycle is impossible. If you have just installed a massive new Linux kernel patch, reconfigured the master GRUB bootloader, or if a rogue background daemon is causing a catastrophic memory leak that `kill` commands cannot resolve, you must force a mathematical reinitialization of the hardware. You must instruct the core OS to safely flush all active RAM payloads to the SSD, terminate all networking handshakes, and command the motherboard to execute a hard reboot, spinning the architecture back up from a sterile state.
How to Reboot Ubuntu from Command Line
The UNIX architecture provides multiple God-level binaries engineered to execute power cycling. Because this command terminates the OS, it universally requires `sudo` (root) execution privileges.
1. Open your terminal application or connect to the server via SSH.
2. Method 1: The Standard Reboot Command (The Supreme Protocol):
* This is the mathematically safest and most direct execution pathway.
* Type exactly:
sudo reboot
* Press Enter and inject your administrator password.
* The Mathematical Result: The OS broadcasts a `SIGTERM` signal to all active applications, gracefully closes file systems to prevent data corruption, and instructs the ACPI (Advanced Configuration and Power Interface) to restart the motherboard. Your SSH tunnel will instantly sever with a “Connection closed by remote host” error.
3. Method 2: The Shutdown Command (Delayed Execution):
* If you are operating a server with active users and need to mathematically delay the reboot to allow them to save data.
* Type exactly (to reboot the server in precisely 5 minutes):
sudo shutdown -r +5
* Press Enter. The `-r` flag dictates a reboot (rather than a halt). The kernel will broadcast a severe warning message to all active terminal sessions counting down the minutes.
* The Instant Override: To execute the shutdown command instantaneously, bypassing the timer:
sudo shutdown -r now
4. Method 3: The Systemd Override (The Modern Daemon):
* Modern Ubuntu architectures utilize `systemd` as the master initialization daemon. You can command it directly to execute the power cycle.
* Type exactly:
sudo systemctl reboot
* Press Enter.
5. Phase 4: The Hardware Interrupt (The Emergency Failsafe):
* CRITICAL: If the OS is so violently frozen that standard commands hang indefinitely, you can attempt the Magic SysRq keys, but via SSH, your only mathematical recourse is often logging into your hosting provider’s (e.g., AWS, DigitalOcean) web console and executing a raw, hardware-level power cycle from the hypervisor dashboard.