More
referral
Increase your income with Hive. Invite your friends and earn real cryptocurrency!

Computer to sleep when closing the lid

Hello all
i have a simple question. I’ve been doing some test with a laptop and I wondering what is the command to disable the feature “put the computer to sleep when closing the lid”. Any suggestion? Maybe

 sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target 

? Thank you

1 Like

Hello Edo,

I tried : sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
It works
Source link : https://wiki.debian.org/Suspend