How to Lock Your Windows or Mac Computer: Step-by-Step Guide

Download Article
Keep your computer safe when you step away by locking it
Download Article

Locking your computer is a good way to protect it from unwanted users when stepping away for a moment. Keep in mind that this is a not an end-all security solution, but will help prevent basic tampering with your work while you are away. Read on to learn more.

Simple Keystrokes to Lock Your Computer

To lock a Windows computer, press Win + L. On Mac, press Ctrl + Shift + the power button or eject button (if your Mac has a CD drive). When you try to unlock your computer, it will require a password to log back in. If it doesn't, you can adjust these settings in your computer's sign-on settings.

Section 1 of 3:

Locking a Computer

Download Article
  1. How.com.vn English: Step 1 On Windows, press ⊞ Win+L on your keyboard.
    This will lock your screen. Your account’s password/PIN will be required to unlock it.
    • You can also press Ctrl + Alt + Del and select Lock from the menu options.
    • If your computer doesn't require a password to unlock, read the section of this article on setting your Windows sign-in options.
  2. How.com.vn English: Step 2 On Mac, press Ctrl+⇧ Shift+Power on your keyboard.
    This will lock your computer’s screen without fully sleeping the computer. You will be prompted for your password upon any attempt to unlock.[1]
    • If your Mac has a CD/DVD drive you can use Ctrl + Shift + Eject to perform the same action.
    • If your computer doesn't require a password to unlock, read the section of this article on setting your Mac sign-in options.
  3. Advertisement
Section 2 of 3:

Setting Sign-in Options (Windows)

Download Article
  1. How.com.vn English: Step 1 Open Windows Settings.
    Hit Win and select Settings, which has a cogwheel icon.
    • On older versions of Windows, open the Control Panel by hitting Win and selecting Control Panel. If you do not see it listed, enter "Control Panel" into the search bar and select it from the results.
  2. How.com.vn English: Step 2 Click Accounts.
    This option has an icon of a person.
    • On older versions of Windows, select User Accounts from the Control Panel.
    • Windows 10 and 8 require account passwords for their accounts when they are created. Users on older versions can go to Make Changes to Your User Account and click Create a password next to the account profile in use.
  3. How.com.vn English: Step 3 Select Sign-in options.
    This is listed in the left sidebar and will take you to another options page.
  4. How.com.vn English: Step 4 Change your password requirements.
    Under the "Require sign-in" section, select "When PC wakes up from sleep" from the dropdown.
  5. How.com.vn English: Step 5 Create a PIN (optional).
    Click Add under the PIN header. After entering your account password, you can enter a PIN twice (second time to confirm). PINs can only be numeric. PINs will be used in place of passwords when logging in or unlocking your computer.
    • You can modify the time it takes for your display to automatically sleep (thus locking it) by going to Settings > System > Power and Sleep. Select your desired time period from the dropdown menu under Screen.
      • Note that you will need to adjust this time limit for both "plugged in" and "on battery" states for laptops.
    • The computer will also lock if your computer enters Sleep mode. The time to enter sleep can be modified at Settings > System > Power and Sleep under the Sleep header.
  6. Advertisement
Section 3 of 3:

Setting Sign-in Options (Mac)

Download Article
  1. How.com.vn English: Step 1 Open System Preferences/Settings.
    Open the Apple menu in the upper left corner and select System Preferences/Settings.
    • You can also launch it from the launchpad or quick launch bar at the bottom of the screen.
    • Users running a recent version of MacOS or OSX will have had to create a password when setting up their computer. Users running older versions can create a password by going to Accounts in System Preferences/Settings and selecting Change Password next to the user account.
  2. How.com.vn English: Step 2 Click Security and Privacy.
    This is located in the top row of options.
  3. How.com.vn English: Step 3 Select the General tab.
    Tabs are listed along the top of the window.
  4. How.com.vn English: Step 4 Click the the lock icon.
    This is located in the lower left corner and will prompt you to enter your password. Once entered, this will unlock the settings and allow them to be modified.
  5. How.com.vn English: Step 5 Set your password preferences.
    Select the Require Password after sleep or screensaver begins checkbox. This setting forces the user to enter a password after a selected amount of time has passed following the display entering sleep or screensaver.
  6. How.com.vn English: Step 6 Select Immediately from the dropdown.
    This is located next to the checkbox and will make it so the user must always enter a password after the display enters sleep/screensaver.
    • You can select other time limits before a password is required from the dropdown menu. This can be useful if you want to be able to return from a display sleep quickly without entering your password. However, Immediately is the only option that effectively "locks" your computer on command.
  7. How.com.vn English: Step 7 Select Disable Automatic Login (OSX 10.9 or earlier).
    Automatic login allows users to bypass password entry when booting the computer and waking from sleep. Disabling it ensures that a password prompt will appear when the screen is locked or slept.[2]
    • This feature was removed for Administrator accounts on OSX 10.10 and later.
    • Optionally, you can click the lock icon again to relock these changes, but they will be saved either way.
  8. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Is there a way to lock my Fedora computer from my little brother?
    How.com.vn English: Skooter1504
    Skooter1504
    Community Answer
    Put a password on it.
  • Question
    If I can sign on to my Wi-Fi with my computer locked, It does not seem very secure. What is the best way to totally lock my computer from anyone Getting into it?
    How.com.vn English: Community Answer
    Community Answer
    First, when your computer is locked, an intruder would still require your password to access the computer, even if they are on your network. Second, how would an intruder access your computer unless they were physically there in order to connect to WiFi? The issue you have would never occur, unless they had physical access to your computer, in which case they would not need to access the WiFi.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Video

      Tips

      • Hit any keyboard key or move the mouse to wake the screen and unlock the computer.
      • Use a secure password to maximize the security of your computer lock.
      • On Macs, you can also use "Hot Corners" to activate the screensaver (effectively locking the screen with the settings above). Go to System Preferences/Settings > Desktop & Screensaver > Screen Saver > Hot Corners. Select the dropdown menu for the corner you want to use and set the function to screensaver. Now, when you move the cursor to that corner the screensaver will activate.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      How.com.vn English: Spike Baron
      Co-authored by:
      Network Engineer & Desktop Support
      This article was co-authored by Spike Baron and by How.com.vn staff writer, Hannah Dillon. Spike Baron is the Owner of Spike's Computer Repair based in Los Angeles, California. With over 25 years of working experience in the tech industry, Spike specializes in PC and Mac computer repair, used computer sales, virus removal, data recovery, and hardware and software upgrades. He has his CompTIA A+ certification for computer service technicians and is a Microsoft Certified Solutions Expert. This article has been viewed 211,508 times.
      How helpful is this?
      Co-authors: 14
      Updated: May 14, 2024
      Views: 211,508
      Article SummaryX

      1.Open your Windows Settings.
      2.Click Accounts.
      3.Click Sign-in options.
      4.Select When PC wakes up from sleep.
      5.Click Add.
      6.Press Windows key + L to lock.

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 211,508 times.

      Reader Success Stories

      • How.com.vn English: Anonymous

        Anonymous

        Oct 10, 2016

        "Very quick and easy solution to my question! Thank you!"
      Share your story

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement