procedure to halt Linux system immediately and safely without monitor which I tested

rupeshforu3

In the zone
Previously I have created a similar thread and creating a new because previous one doesn't have a solution and the current one has solution.

Hi Many of us use Linux desktop computer or even a server with optionally a secondary power supply such as ups etc.,. Many of of us but not all think to shutdown the system immediately and safely without turning on the monitor but don't know how to do so. I have found a solution and sharing with you which may help you.

I have asked many of you how to shutdown the system immediately and safely by pressing power button present in cabinet box without turning monitor on. Many of you suggested to buy a new apc ups or buy a RTL usb converter and connect ups with usb port and install a software etc. Some people suggested to click shutdown button in desktop environment etc.,.


But one person from tech enclave forum suggested a method and it working properly and I have tested a number of times. I am providing this method as it may help you and other people like me.


The procedure is as follows


Create a symbolic link in bash terminal as follows


Code:
sudo ln -sf /usr/lib/systemd/system/poweroff.target /etc/systemd/system/ctrl-alt-del.target


After this press ctrl-alt-f4 which should bring or switch from graphics to console login prompt.


After this press ctrl-alt-del which will instantly start shutting down your Linux system safely and immediately, without any confirmation.


Here after pressing Ctrl alt F1 I am at graphics login prompt and after pressing Ctrl alt f2 I am at desktop environment and after pressing Ctrl alt f4 I am at console login.


The above may vary from Linux distribution to distribution so try to press ctrl alt F1 or ctrl alt f2 or ctrl alt f3 ctrl alt f4 keys and any one can bring you to console login. After that press ctrl alt del which will shutdown system immediately and safely.


Note that all these happened with in 15 seconds even when my monitor is turned off.


Finally thanks to some of you who have given some suggestions and patience.

Regards,
Rupesh.


Sent from my LM-G710 using Tapatalk
 
Last edited:

K_akash_i

Journeyman
or u could use lxqt which shuts down when u press power button(try installing lxqt > sudo dnf install @lxqt-desktop and use it , if u dont like it remove it)
u may need a better windows manger tho
 
OP
R

rupeshforu3

In the zone
lxqt .. command work with only lxqt desktop environment only but the method I have given works for any desktop environments like gnome mate lxde kde xfce etc.

I think Your question is why can't you directly type shutdown command etc., Any method can take atleast 90 seconds but the method I have given takes less than 15 seconds only that too without using monitor.

I have given instructions for people who don't have proper power supply and using ups. If you have proper power supply neglect this thread totally.

Sent from my LM-G710 using Tapatalk
 
Last edited:
Top Bottom