Linux command
i3lock 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Lock the screen with a white background
i3lock
Lock with a solid color background
i3lock -c [000000]
Lock with a background image
i3lock -i [path/to/image.png]
Lock with a tiled background image
i3lock -t -i [path/to/image.png]
Lock without showing the unlock indicator
i3lock -u
Lock and show failed authentication attempts
i3lock -f
Lock without forking to the background
i3lock -n
说明
i3lock is an improved screen locker based on slock. It displays a blank screen or image and requires PAM authentication (typically a password) to unlock. After a configurable timeout, the screen turns off via DPMS. An unlock indicator circle appears when typing: it shows a green fill while verifying, a red fill on failure, and clears when idle. The indicator provides visual feedback without revealing password length. The locker was designed for the i3 window manager but works with any X11 session.
参数
- -v, --version
- Display the version of i3lock.
- -n, --nofork
- Do not fork after starting. Useful for combining with other commands.
- -b, --beep
- Enable beeping on authentication failure.
- -c _RRGGBB_, --color _RRGGBB_
- Set background color in 6-byte hex format (default: white).
- -i _PATH_, --image _PATH_
- Display the given PNG image as background instead of a blank screen.
- -t, --tiling
- Tile the image across the entire screen.
- -u, --no-unlock-indicator
- Disable the unlock indicator circle shown when typing.
- -f, --show-failed-attempts
- Show the number of failed authentication attempts.
- -p _win|default_, --pointer _win|default_
- Control mouse pointer visibility. "default" shows the pointer, "win" shows a Windows-style pointer.
- -e, --ignore-empty-password
- Do not validate an empty password.
- --raw _FORMAT_
- Read the image given by --image as raw bytes instead of PNG.
- --debug
- Enable debug logging. Note: this logs the password to stdout.
FAQ
What is the i3lock command used for?
i3lock is an improved screen locker based on slock. It displays a blank screen or image and requires PAM authentication (typically a password) to unlock. After a configurable timeout, the screen turns off via DPMS. An unlock indicator circle appears when typing: it shows a green fill while verifying, a red fill on failure, and clears when idle. The indicator provides visual feedback without revealing password length. The locker was designed for the i3 window manager but works with any X11 session.
How do I run a basic i3lock example?
Run `i3lock` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -v, --version do in i3lock?
Display the version of i3lock.