How to Change Lid Close Behavior in Ubuntu 20.04

This simple tutorial shows how to change the action (e.g., power off, hibernate, do nothing, or lock) when laptop lid is closed in Ubuntu 20.04, while it suspends Ubuntu by default. Dconf editor offers options to change the action to take when the laptop lid is closed on AC or power, but it doesn’t work! So far as I know, you can edit the logind.conf file to change the action. And it should work on all Ubuntu desktop, server, and flavors. 1.) Open terminal (press Ctrl+Alt+T on Gnome) from your…