How to use Linux hibernate (it save the current memory before shut down)

# All in all

Hibernate is better than suspend, because it saves memory into disk, so even if your computer power is off, next when you reboot, you won't lose your current working process.


# For ubuntu

```

sudo systemctl hibernate

```

https://askubuntu.com/a/1358453


# For PopOS

I don't recommend you use newer version that higher than 18.04 or 20.04. Because it will force you upgrade system and adds more restrictions to your computer.

It seems all you need to do is: 1. create a swap partition that bigger than your memory. 2. add swap uuid to /etc/fastab. 3. add resume from uuid command to /etc/default/grub.

Don't use encrypted stuff, it adds complexity. If you can't prevent your computer physically access from others, why you create gun?


```

# /etc/fstab

UUID=3823625d-8404-4774-8346-7d762f63a052 none swap sw 0 0

/dev/mapper/data-swap  none  swap  defaults  0  0

```


```

# /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=3823625d-8404-4774-8346-7d762f63a052"

```


```

sudo update-grub

```


https://support.system76.com/articles/enable-hibernation/#:~:text=Enable-,Hibernation,-on%20an%20Encrypted