Command: lock

Immediately lock your Mac, displaying the login screen.

Usage

Usage: m lock [options]

Options:
  --help      Show this help message and exit

Description

This command provides a quick and easy way to secure your computer from the command line. It is equivalent to selecting "Lock Screen" from the Apple menu.

This command is implemented as a Python script that calls a private system framework.

Example

# Lock the screen
m lock