Home How To How To Shut Down A Linux PC That Won’t Turn Off

How To Shut Down A Linux PC That Won’t Turn Off

No operating system is perfect. Even if there is one, there could be problems with drivers and apps. Linux is no exception. Although it is more stable than Windows (in many cases, not all!), It is likely a time will come when it is necessary to restart the Linux computer. This could be due to the fact that something is not working. Alternatively, you can connect via SSH to a remote computer or server and want to restart it or turn it off completely.

How To Shut Down A Linux PC That Won’t Turn Off

Shut Down A Linux PC That Won’t Turn Off

Have you ever tried to shut down a Linux system, only to find that it refuses to shut it down? We’ve all been there. Even the best open-source technology has problems sometimes. If you are tired of having to press the power switch to turn off an unresponsive Linux PC, or you may not be able to physically shut it down because it is a remote machine, this guide is for you! Here’s how to turn off a PC with Linux that won’t turn off.

Please note that data loss may occur when you shut down a Linux system. Always make sure you regularly back up your data to avoid loss.

Also Read: 9 Best Lightweight Linux Distros For Old Computers [ 2019 ]

Below you can find some of the effective methods that you can try right away to shut down Linux PC.

Method 1 – Poweroff

The first way a Linux system can be turned off is by using the poweroff command. This command immediately turns off your Linux system without warning. To use this command, you need to access an emergency terminal window in TTY mode.

Press Ctrl + Alt + F2 to access TTY mode on your Linux computer system. After opening the TTY emergency console, search for the login screen and type “root” as a user. As an alternative, use a username if the root account is disabled.

poweroff

If you are logged in with the root account, enter poweroff in the command line console to turn everything off immediately.

poweroff

Or, do sudo -s to get root access with a normal user, so do:

poweroff

Can’t access TTY because you’re using a dial-up connection? Get root on your remote SSH console with:

su –

Or:

sudo -s

Then, with root access, type the shutdown command to immediately shut down the remote computer.

poweroff

Also Read: How To Fix Folders Not Writable By User Account In Linux

Method 2 – Reboot

Rebooting is another way to take control of a Linux system and force it to reboot. You may want to use this method, unlike stopping, because sometimes the command of poweroff has difficulty working.

To use the reboot command, you must have access to the TTY console. Press Ctrl + Alt + F2 on the keyboard to access it. Then, when the command line console is displayed, enter “root” in the userbox to log in with root access. If you have disabled root access, log in with a traditional user account.

reboot

With the root account started, use the command of reboot to restart the Linux system, forcing it to shut down and then turn it back on.

reboot

The reboot command also has the ability to completely shut down a system, with the help of a command-line switch. This switch, named as “f”, will tell the reset command to shut down the Linux system completely, instead of restarting it. To use it, enter the following command.

reboot -f

Do you use a traditional user account instead of the root user? do:

reboot -f

Or shutdown Linux system with:

sudo reboot -f

Those who cannot use TTY mode must execute the following commands in a terminal session. Make sure you use “-f” if you want the reboot command to force a shutdown.

root:

su –

reboot

Or you can also try

sudo reboot

Method 3: systemctl poweroff/reboot

Nowadays the Systemd init system is integrated into most Linux operating systems. One of the most important advantages of using the Systemd init system is that it has many uses that are easy to understand since the command line syntax is simplified.

If you are trying to shut down a PC with Linux and you cannot use the above-mentioned commands, using systemctl poweroff is as good as it says to the Systemd boot system (the tool that helps your Linux system to turn on and turn itself off and does many other things to turn everything off.

Like all the other commands, the best way to force a system to stop, especially if it is blocked or not responding, is to access the TTY emergency console by pressing Ctrl + Alt + F2.

systemctl-poweroff

Once the TTY emergency console is on the screen, enter “root” in the userbox to log in to the root account and access the root command line. Alternatively, log in with a traditional user if the root account cannot be used. From there, run the systemctl poweroff command to instantly turn everything off.

systemctl poweroff

Or, if you’re using a traditional user, follow these steps:

sudo systemctl poweroff

Can’t use TTY mode? Enter the following commands in an SSH terminal.

su-

systemctl poweroff

systemctl reboot

systemctl-reboot

The Systemd shutdown command forces everything to shut down, but if that doesn’t work, try trying the systemctl reboot command to force the machine to reboot.

systemctl reboot

Or, for a traditional user, use the sudo command.

sudo systemctl reboot

Finally, if you can’t access TTY mode to restart, try the following command below.

su –

systemctl reboot

Recommended:

If you have any query feel free to drop that in the comment section and Visit ATechGuides for more information.