Is it possible to set my laptop to shut down when the lid is closed?

I’ve tried my best to look for solutions online but I can’t really find much. I’m not that technical of a user and found an approach that involved editing the /etc/systemd/logind.conf file however, the file didn’t exist in dom0, so I couldn’t do this.

Does anyone know how to do this?

Are you sure it doesn’t exist for you? I have it there and that’s how I’ve achieved what you are seeking to achieve

So far I’ve done sudo nano /etc/systemd/logind.conf but it said it was a new file and it was completely blank. Then I went into Thunar and went to /etc/systemd but the only folders were network, system and user. No other files or folders were there. :confused:

The default / example logind.conf is /usr/lib/systemd/logind.conf, you can copy it to /etc/systemd/logind.conf and customize it to your needs.

Another (better) solution is to create a drop-in but it’s maybe more complicated for you.

Resources: