Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!
Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.
Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!
[Solved] QNAP - SSH - How to reboot or force reboot
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2741
Topic starter
July 6, 2022 2:48 PM
A few minutes ago, I wasn't able to do a controlled shutdown of my QNAP through the WebUI ....
So I tried (in SSH):
reboot
Which wanted to work, but shutting down services was still not going anywhere after 15 minutes.
After some searching (yes, you can hold the power button 2 seconds for a controlled shutdown, or 5 seconds for a hard shutdown), I found this and it work great in these kind of emergencies:
kill 1
I did find it challenging to find a good explanation, but as far as I recall, PID "1" is the kernel, and if that process dies all other processes get killed automatically.
I see other recommend the following kill command but I have not tested this on my QNAP as it was already rebooting. It basically kills all processes except the process that is running the kill command.
kill -9 -1
I hope this useful to someone ... 😊