Execute command before shutdown/reboot
4465
Execute a script upon logout/reboot/shutdown in Ubuntu
21270
How do I write a bash script to restart a process if it dies?
37017
How can I put the computer to sleep from Command Prompt/Run menu?
49188
One systemctl command to both start and enable
128312
How can I keep a command I started from the shell running if I logout from the shell?
78479
How do I run a command before or after every command written in the console?
85942
How can I make a process I start during an SSH session run after the session has ended?
7213
Conveniently schedule a command to run later?
13933
Shutdown from terminal without entering password?
54931
Use a execute command once
20425
How can I run a command after boot?
61757
Does `at` run a command later if the computer is off at the specified time?
5575
How can I run a command which will survive terminal close?
148278
Is there any way to execute something when closing the laptop's lid?
24645
Automatically restart a Unix job if it goes down?
116248
Best Way to Gracefully Shutdown a Java Command Line Program
6414
Command line command to auto-kill a command after a certain amount of time