LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

physlock

locks all virtual consoles and prevents unauthorized access to the system

TLDR

Lock all consoles
$ physlock
copy
Lock and mute kernel messages
$ physlock -m
copy
Lock and disable SysRq
$ physlock -s
copy
Lock with custom message
$ physlock -p "[Locked!]"
copy
Lock and detach (for suspend scripts)
$ physlock -d
copy

SYNOPSIS

physlock [-d] [-m] [-s] [-p message] [-l]

DESCRIPTION

physlock locks all virtual consoles and prevents unauthorized access to the system. Unlike screen lockers that only protect graphical sessions, physlock secures all TTYs, preventing access through Ctrl+Alt+F1-F6 switching.Authentication is required from the current user or root to unlock. This makes it suitable for securing systems with physical access concerns, particularly servers or kiosks.

PARAMETERS

-d

Fork and detach (daemonize)
-m
Mute kernel messages while locked
-s
Disable SysRq key while locked
-p _message_
Display message before password prompt
-l
Only lock the current tty

INSTALL

sudo apt install physlock
copy
sudo apk add physlock
copy
sudo zypper install physlock
copy
nix profile install nixpkgs#physlock
copy

CAVEATS

Does not lock graphical displays; use alongside a screen locker (e.g., i3lock, slock) for X11/Wayland sessions. Requires PAM for authentication. Detach mode (-d) is useful in suspend/hibernate scripts (e.g., systemd sleep hooks). SysRq disable is only effective if the kernel has CONFIGMAGICSYSRQ enabled. Must be run as root or with appropriate permissions.

HISTORY

physlock was created by Bert Muennich as a lightweight alternative to vlock. It focuses on securing physical console access with minimal dependencies, making it suitable for embedded and minimal systems.

SEE ALSO

vlock(1), xlock(1), loginctl(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid