Laptops

How to Lock Laptop from Keyboard?

Locking a laptop and instantly requiring a password to log in again can be useful for various situations. The ability to quickly lock your devices is available on both MacBook and Windows laptops. Sometimes the touchpad of your laptop stops working, and we are unable to perform any function with the touchpad and require your keyboard to perform some changes. Have you ever got stuck in this kind of situation? This guide will help you.

How to Lock Windows Laptop from Keyboard?

Windows laptop allows you to lock it with the keyboard quickly. This is the quickest way to lock it or helpful in the situation when the touchpad of your laptop is acting up. There are different ways to lock the laptop:

  1. Keyboard Shortcut
  2. Command Prompt
  3. Run Dialogue Box
  4. Windows Icon

1: Keyboard Shortcut

The quickest and easiest ways to lock the laptop in a few seconds are:

  • Press the Windows+L keys.
  • Press Alt+Ctrl+Delete and a menu will appear to choose the lock to lock your laptop.

2: Command Prompt

You can lock your laptop using a command prompt by just executing a single command:

Step 1: Press Windows+S to open the search bar and search for the Command Prompt; open it:

Step 2: Execute the following command:

rundll32.exe user32.dll,LockWorkStation

3: Run Dialogue Box

The other method to lock the laptop using the full path is with the Run dialogue box. This box on a Windows laptop allows you to open those files and programs whose path is known directly:

Step 1: Press Windows+R to open the Run box:

Step 2: Type this command and hit enter:

rundll32.exe user32.dll,LockWorkStation

4: Windows Icon

Every Windows laptop come with the dedicated Windows key with the logo in the bottom left corner of your keyboard:

Step 1: Press the Windows icon key:

Step 2: Press the tab button and using arrow key select power icon:

Step 3: Use arrow keys to open the power option and hit enter on sleep to lock the laptop:

How to Lock MacBook from Keyboard?

Like Windows laptops, MacBooks allow you to lock your laptop if needed quickly:

  1. Close the Lid
  2. Keyboard shortcuts
  3. Terminal

1: Close the Lid

Close the lid of your MacBook, and when you reopen it, it will require the password to continue.

2: Keyboard Shortcut

Use keyboard shortcut Command+Ctrl+Q to lock the MacBook

3: Terminal

Terminal allows you to control your MacBook using commands; you can lock your MacBook using the command:

Step 1: Press Command + Space to open spotlight search and type Terminal to launch it

Step 2: Write the below command and hit Enter:

pmset displaysleepnow

Conclusion

While using your laptop if you get in any emergency and want to lock your laptop instantly then you can do it with some keyboard shortcut keys. Whether you are a MacBook user or a Windows laptop user, there are shortcut keys for both devices. The quickest way to lock Windows laptop is Windows+L, and for the MacBook, it is Command+Ctrl+Q.

About the author

Zainab Rehman

I'm an author by profession. My interest in the internet world motivates me to write for Linux Hint and I'm here to share my knowledge with others.