How to Enable Automatic Screen Lock In Ubuntu Linux
Automatic screen lock in Ubuntu Linux secures your computer session after a set period of inactivity so nobody can view your files when you step away. Ubuntu locks your screen after 5 minutes by default, but you can change this timer or turn off the feature entirely in your system settings.
Open System Settings, navigate to Privacy, then Screen. Toggle the Automatic Screen Lock switch to On and set your preferred delay time. This ensures your Ubuntu system locks itself after a period of inactivity.
How to turn on or off automatic screen lock in Ubuntu Linux
Turning on automatic screen lock in Ubuntu Linux helps protect your computer from unauthorized access by locking your desktop after a set period of inactivity. You can easily turn this feature on or off through the main system settings. This keeps your files secure when you walk away from your desk, and you can change the idle time to fit how you work.
Ubuntu Linux automatically locks the screen when there’s no active user activity. This protects your desktop and files from unauthorized access.
Here’s how to turn it on or off in Ubuntu Linux.
Ubuntu Linux has a centralized location for most of its settings. System configurations, user creation, and updates live inside the System Settings panel.
To open System Settings, go to the Activities overview (where you can search for applications) and type Settings.

Alternatively, click the System menu (usually found in the top-right corner of your desktop's top bar).
On the System menu, select Settings, as highlighted below.

In the Settings app, click the Privacy tile to expand it.

In the Privacy settings, click on Screen to open that panel.
In the Screen settings, toggle the Automatic Screen Lock switch to On or Off.
If turned off, that option will be grayed out.

When your screen is locked and you want to unlock it, press the Esc key or swipe up from the bottom of the screen with your mouse.
Enter your password and resume your session.
The display will now lock itself after the chosen timeout period.
Locking your screen automatically takes the guesswork out of physical security:
- An automatic screen lock is a crucial security feature that protects your computer from unauthorized access.
- Ubuntu Linux offers a convenient way to manage the automatic screen lock feature through the System Settings panel.
- Users can customize this feature by toggling the Automatic Screen Lock switch and setting the lock delay to suit their preferences and security needs.
- Remembering to lock your computer screen can be a hassle, but with automatic screen lock, you can have peace of mind knowing your system is protected when idle.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!