vlock
Lock virtual console or X session
SYNOPSIS
vlock [options] [console...]
PARAMETERS
-a
Lock all virtual consoles.
-c
Lock the current virtual console.
-n
Don't blank the screen.
-q
Be quiet (less verbose output).
-v
Be verbose.
-V
Display version information and exit.
-h
Display help and exit.
--version
Display version information and exit. (GNU long option)
--help
Display help and exit. (GNU long option)
DESCRIPTION
The vlock program is used to lock one or more virtual consoles. When vlock is active, access to the locked console(s) is prevented until the correct password (the user's login password) is entered. This is useful for preventing unauthorized access to a system when you need to leave it unattended for a short period. Unlike simply switching to a different virtual console, vlock provides a secure way to prevent someone from using your current session. Vlock works by disabling input to the specified consoles and blanking the screen (or running a specified program). It uses PAM (Pluggable Authentication Modules) for password verification, ensuring compatibility with various authentication methods. vlock supports locking all consoles, the current console, or a specific list of consoles.
CAVEATS
vlock relies on PAM for authentication, ensure PAM is correctly configured for your system.
Certain configurations or display managers might interfere with vlock's ability to effectively lock the screen.
SIGNAL HANDLING
vlock traps signals like SIGTERM and SIGINT to ensure a clean exit, preventing potential bypasses of the lock.
CUSTOMIZATION
While limited, some distributions offer ways to customize the appearance of the locked screen via configuration files or patches.
HISTORY
vlock has been a standard tool on Linux systems for many years, evolving alongside the development of virtual consoles and security best practices. Its usage has remained consistent, offering a straightforward mechanism for screen locking in console environments. The move to PAM authentication strengthened its security posture. Initial version was likely developed in the mid-1990s.
SEE ALSO
slock(1), xlock(1), xscreensaver(1)