slock(1)

slock1

Simple x screen locker

Usage

slock [-v] [cmd [arg ...]]

Overview

slock is a simple X screen locker. If provided, cmd is executed after the screen has been locked.

The options are as follows:

-v

Print version information to stdout and exit.

Exit status

The slock utility exits 0 on success, and >0 if an error occurs.

Examples

$ slock /usr/sbin/s2ram

Security considerations

To make sure a locked screen can not be bypassed by switching VTs or killing the X server with Ctrl+Alt+Backspace, it is recommended to disable both in xorg.conf(5) for maximum security:

Section "ServerFlags"
	Option "DontVTSwitch" "True"
	Option "DontZap"      "True"
EndSection

Customization

slock can be customized by creating a custom config.h from config.def.h and (re)compiling the source code. This keeps it fast, secure and simple.

Releases

10 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0–5.0
  2. 7
  3. 8
  4. 9
  5. 10–13
  6. Arch

-v since Debian 9 (Stretch).

From slock 1.7-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.