# Keep your laptop up even when you close the lid on Linux

**TLDR:** You just have to edit the file `/etc/systemd/logind.conf`.

```bash
$ sudo vi /etc/systemd/logind.conf # and the change the parameter to ignore

[Login]
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore # This option specifically is the default on Debian so if on your system did not modify that option you can just not write it 

$ sudo systemctl restart systemd-logind.service # Or reboot for the change to take effect
```

There are also a ton of other options in that file, so you can explore the content of the file just to have an idea of what you can do.

Resources:
- https://wiki.debian.org/Suspend 
- https://www.alphr.com/keep-laptop-when-closed/
