---
name: "slock"
section: "1"
platform: "linux"
package: "slock"
version: "1.7-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/slock"
---

# slock(1)

simple X screen locker

## NAME

**slock** – simple X screen locker

## SYNOPSIS

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

## DESCRIPTION

**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)](/xorg.conf/5.md) 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.
