You can create a hot key combination to hibernate your PC:
- Create a script file to execute the hibernation:
sudo nano /usr/local/bin/hibern8
Add the following lines to the file:
#!/bin/bash
systemctl start systemd-hibernate - Then, make it executable:
sudo chmod +x /usr/local/bin/hibern8 - Then, edit your visudoer’s file to allow it to execute the
hibern8command without a password:
sudo visudo
Add the following line to the file:
usernameALL=(ALL) NOPASSWD: /usr/local/bin/hibern8
(replaceusernamewith the username of your user.) - Then create a keyboard shortcut in GNOME to execute the command
sudo hibern8.