Skip to main content
Quick Tip

How to Shutdown Ubuntu Server [Beginner's Tip]

Here are various ways you can shut down Ubuntu system from the terminal.

Abhishek Prakash

Warp Terminal

To shutdown Ubuntu server immediately, you can use the shutdown command like this:

sudo shutdown now
Yes. You need to be a sudo user or root to shut down a Linux server because it is an administrative task.

Some people prefer to use shutdown -h now but that's not required as both refer to power-off.

Keep in mind that you must have a way to power it on back again otherwise prefer to reboot remote Ubuntu servers.

How to shutdown Ubuntu server

Shutdown Ubuntu Server

Linux shutdown command is not the only way to shut down Ubuntu or other Linux from the terminal. There are other commands that can be used to shutdown Linux from the shell.

But first let's take another look at it this command.

1. Poweroff Ubuntu using shutdown command

You can use the shutdown command without any options. This will schedule a shutdown a minute from your current time.

sudo shutdown

You can cancel the scheduled shutdown with option -c:

sudo shutdown -c

No message is displayed when the shutdown is cancelled.

Here's a screenshot of what it looks using the above commands. I have used Debian server in the image below but it should be the same for Ubuntu as well.

2. Shutdown Ubuntu using systemd

You can use systemd command to shutdown i.e. power off an Ubuntu server or desktop.

sudo systemctl poweroff
Linux Shutdown Command: 5 Practical Examples
The shutdown command in Linux allows you to shut down, reboot or schedule a shutdown of your system. This article explains the most common and useful examples of the Linux shutdown command.

3. Immediately shutdown Ubuntu server using poweroff

Can't wait for the shut down? You always have the shutdown now for that. Another way to shut down immediately is by using the poweroff command:

sudo poweroff

I hope you found this quick Linux tip useful. Your comments and feedback is welcome.

Do subscribe to regularly receive Linux tips and tutorials for free.

Abhishek Prakash