How to Properly Shut Down Ubuntu Linux: A Complete Guide
Shutting down Ubuntu Linux safely means closing your apps and saving your work before the computer loses power. Ubuntu then has time to finish writing data to disk and stop its services in order, which prevents file damage. You can turn off your PC from the desktop menu, or by typing the sudo shutdown -h now command in the Terminal (a text-based window for running commands). This guide covers both, plus scheduled shutdowns and the power button for emergencies.
You can shut down Ubuntu via the system menu in the top-right corner, selecting Power Off / Log Out, then Power Off. Alternatively, use the command line with `sudo shutdown now`. For emergencies, holding the physical power button is an option.
How to turn off the PC in Ubuntu Linux from the system menu
The system menu is the easiest way to shut down. It works the same for every user and needs no commands. Save your work first, then:
- Click the status area in the top-right corner of the top bar. It holds the network, volume and battery icons.
- You should now see a drop-down menu with quick settings.
Now open the power options:
- Click Power Off / Log Out to expand the menu. On Ubuntu 24.04 and later, the quick settings menu has a power icon at the top instead. Click it to see the same options.
- You should now see a short list that includes Power Off, Restart and Log Out.

- Select Power Off from the expanded options.
- A dialogue box should appear asking whether you want to power off.

- Click the Power Off button in the dialogue box to shut down your Ubuntu PC.
If you do nothing, the dialogue shows a countdown and Ubuntu powers off by itself after about 60 seconds. Click Cancel if you change your mind. The screen goes black and the machine switches off, usually within a few seconds.

Shutdown Ubuntu Linux from the command line
The command line is useful if you prefer the keyboard, if you work over a remote session, or if you want to schedule a shutdown. Here is how to start:
- Press Ctrl+Alt+T to open a terminal.
- Type the shutdown command, followed by when you want it to happen. For example, type shutdown +15 to turn off your PC in 15 minutes.
- Press Enter. If the system asks for permission, put sudo in front of the command and enter your password when asked. The terminal will not show characters as you type the password, which is normal.
The terminal should print a message confirming the time the shutdown is scheduled for.
sudo shutdown now
To schedule a shutdown for a specific time of day, give the shutdown command the time in 24-hour clock format, written as hours and minutes. For example, 5:00 PM is written as 17:00. The time is read from the computer’s own clock, so check that the system time and time zone are right before you rely on it.
Example: shutdown at 5:00 PM
sudo shutdown 17:00
You can also set a delay instead of a clock time. A plus sign followed by a number means “this many minutes from now”. For instance, to shut down in 15 minutes, use the following command:
sudo shutdown +15
Shutdown Ubuntu Linux using the PC Power button
Use the physical power button only when the desktop stops responding and the other methods are not available. On most Ubuntu desktops, a quick press of the power button opens the power off dialogue. If the screen is frozen, that will not work.
In that case, press and hold the power button for a few seconds. The hardware cuts power and the operating system stops immediately. Ubuntu does not get a chance to close files or save anything. You may lose unsaved work, and the system may need to check the disk on the next start. Treat this as a last resort.
Choose the method that fits your current situation best. For everyday use, the system menu is the safest choice. Use the terminal when you want a timed shutdown or you are working remotely.
Ubuntu offers several ways to shut down depending on your setup. In short:
- Ubuntu Linux offers various methods to shut down the system, catering to user preferences and circumstances.
- The system menu provides an intuitive, graphical way to shut down the PC, accessible from the top-right corner of the top bar.
- Command line enthusiasts can use the ‘sudo shutdown’ command to turn off the PC, with options to specify a clock time or a wait in minutes.
- As a last resort, holding the power button or disconnecting the power plug may be used if other methods fail. Both risk losing unsaved work and damaging files, so use them sparingly.
Have a question about this guide?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
[…] How to shutdown Ubuntu Linux […]
[…] shutdown button on the start/power menu will close all applications and turn off the computer when […]
[…] Shutdown button closes all apps and turns off your PC. You usually click it when you’re done working […]