Automatic screen lock is a feature provided by all widely used desktop operating systems. There is a default period of inactivity set in your system settings, after which your screen is automatically locked and you have to reactivate it by either clicking somewhere or entering your login password. This feature is best for scenarios when you need to stay away from your computer for some time and you have some critical data stored on your system. In the meantime, while you were away from your system, any intruder can break into the system and steal your critical data. For this reason, an automatic screen lock is very helpful to ensure the security of your data.

Automatic screen lock is enabled by default on most operating systems. On the other hand, if you are physically present near your computer and simply doing other tasks at the same time, then this automatic screen lock feature may prove to be annoying as you have to enter your password again and again after a few minutes of inactivity. In this situation, you can consider disabling your system’s screen lock feature for some time and then re-enabling it once you are done with your work. Today we will show you how to disable/enable the automatic screen lock via the Linux Mint 20 CLI.

Disabling Lock Screen on Linux Mint and Ubuntu

You can easily disable the automatic screen lock through Linux Mint 20 CLI by executing the following command in it:

$ gsettings set org.gnome.desktop.screensaver lock-enabled false

How to Disable/Enable Automatic Screen Lock in Linux Mint 20 trough CLI Desktop linux ubuntu

This command will instantly disable the Linux Mint 20 automatic screen lock and it will not produce any output on the terminal as shown in the image below:

How to Disable/Enable Automatic Screen Lock in Linux Mint 20 trough CLI Desktop linux ubuntu

Enabling Lock Screen on Linux Mint and Ubuntu

You can conveniently enable the automatic screen lock through Linux Mint 20 CLI by executing the following command in it:

$ gsettings set org.gnome.desktop.screensaver lock-enabled true

How to Disable/Enable Automatic Screen Lock in Linux Mint 20 trough CLI Desktop linux ubuntu

This command will instantly enable the Linux Mint 20 automatic screen lock and it will not produce any output on the terminal as shown in the image below:

How to Disable/Enable Automatic Screen Lock in Linux Mint 20 trough CLI Desktop linux ubuntu

Conclusion

In this article, we shared with you the quickest methods of disabling/enabling the automatic screen lock through Linux Mint 20 CLI. It is always recommended to keep the automatic screen locking feature enabled. However, if you do disable it for some time, then you must re-enable it once you have accomplished your task to save your computer system and the data residing in it from intruders.