Linux Command: Put Laptop / Netbook In Hibernate / Suspend Mode

Originally published at: https://www.cyberciti.biz/faq/linux-command-to-suspend-hibernate-laptop-netbook-pc/

How do I suspend or hibernate from bash shell command line under Linux operating systems? How do I suspend or hibernate my Ubuntu Dell laptop using command line, without using additional software?

In my case I wanted to create a keyboard shortcut for pm-suspend-hybrid, to experiment with the state, on Manjaro Linux. I should’ve looked for instructions for (Manjaro) Archlinux. It seems like these instructions don’t work for Manjaro Linux, except for systemctl suspend. I don’t like that the power light flashes when it goes to sleep, as it is distracting, e.g. when I am meditating in the dark with the laptop in front of me. So I used custom shortcuts in Manjaro Linux with the pm-suspend-hybrid command with the Meta + Z shortcut. Actually that doesn’t work.

➜  ~ pm-suspend-hybrid
zsh: command not found: pm-suspend-hybrid

I may have to settle for hibernating rather than suspending.

I set up an alternate global shortcut for hibernate, meta + `, however that caused the display to go black, but with the cursor still showing and the backlight on, then it turned back on.

➜  ~ pm-hibernate
zsh: command not found: pm-hibernate
➜  ~ 

Hibernate doesn’t show in the start menu.

I used sudo systemctl suspend with Ubuntu 18.04 and it works also. The esc key wakes it back up.