Disable auto-suspend when you close your laptop lid

PUBLISHED ON JAN 8, 2016 — SYSADMIN

If you use your laptop as a server, it very usefull to be able to close the lid but how to do this ?

I assume that you use a GNU/Linux operating system like Debian 8 or ArchLinux.

Edit the file : /etc/systemd/logind.conf and edit or add the line :

HandleLidSwitch=ignore

You can now save and close the file and reload the logind configuration :

# systemctl restart systemd-logind

It’s done !