SLOCK(1)
π SLOCK(1) β the slock page from the General Commands Manual π
okay bestie, sit down, hydrate, and let me tell you about slock β¨
πΈ NAME πΈ
slock β the simple X screen locker. that's it. that's the whole vibe. she locks your screen and she does it beautifully π
π¦ SYNOPSIS π¦
slock [-v] [cmd [arg ...]]
likeβ¦ look at her. three little pieces. no cap, it's giving minimalism π
β¨ DESCRIPTION β¨
okay so slock is a simple X screen locker. that's literally the whole pitch and honestly? iconic.
and here's the cute part β if you give her a cmd, she will execute that command after the screen has been locked. so you lock up first, then the thing runs. order matters, bestie π«Ά
the options are as follows:
-vβ prints version information tostdoutand then dips out (exits). that's the whole flag. she's a one-flag wonder and we love her for it π
β EXIT STATUS β
the slock utility exits 0 on success, and >0 if an error occurs. simple as. no crumbs left over π
π EXAMPLES π
here's the moment you've been waiting for, the example:
$ slock /usr/sbin/s2ram
lock the screen, then send the machine off to sleep. main character energy fr fr π΄β¨
π₯ SECURITY CONSIDERATIONS π₯
okay this part is serious, no jokes, listen up bestie π
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
like, genuinely β if you skip this, someone can just β¨vibeβ¨ their way past your lock screen. don't be that girl. disable both. π
π CUSTOMIZATION π
slock can be customized by creating a custom config.h from config.def.h and (re)compiling the source code.
and why tho? because it keeps her fast, secure and simple. the trifecta. the holy trinity. she ate and left no crumbs ππ
π SEE ALSO π
hmm, actually there's no SEE ALSO section here β but she does name-drop xorg.conf(5) up in security considerations, so go read that one if you're curious π§
and that's the whole page, bestie!! this one came from the Debian fam, dated October 6, 2023 β so if you see that date, you know exactly which version of the SLOCK(1) page you're reading π
β¨ stay locked, stay safe, mwah π«Άπ
π¦ where this page comes from
- alpine 3.24: slock-doc 1.6-r0 Β· MIT
- arch rolling: slock 1.7-1 Β· MIT
- nixos 26.05: slock 1.6
- nixpkgs unstable: slock 1.7
- ubuntu resolute: suckless-tools 49-1 Β· MIT
- ubuntu stonking: suckless-tools 49-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms