vlock: lock your terminal (or system)

terminalvlock is a gem of a utility for people who use consoles all the time. vlcok can hide the current state of the terminal and lock it till the user enters his/her password to unlock it. It works for the terminal as well as the virtual consoles. vlock is very useful on shared systems which have multiple users with console access. There is also a way to lockdown the X session using vlock. This way vlock works as an alternative locking mechanism for your system.


To install on Ubuntu:

$ sudo apt-get install vlock


Some common use cases for vlock:

  • Lock a console session (including virtual)
    $ vlock
  • Lock all virtual consoles (must run from a virtual console). This also disables switching the virtual console.
    $ vlock -a
  • Lockdown the whole system from X. vlock switches to a virtual console and then locks the system as in vlock -a.
    $ sudo vlock -n
  • Disable SysRq or Secure Access Key mechanism to kill vlock (more secure)
    $ sudo vlock -ns

Man page: vlock


physlock is an alternative to the dated vlock and is being maintained. The philosophy is similar and it is equivalent to vlock -an. In other words, it locks down aall virtual consoles and X session. It cannot be used to lock a particular terminal. vlock blocks some linux kernel mechanisms like hibernate and suspend but physlock doesn’t. The latter is also more lightweight.

Download the 64-bit pre-compiled binary of physlock. It is compiled on Ubuntu 14.04 amd64.
md5sum: c8348caf8542b4bab90ec3055810055a

Similar software

  • xtrlock: lock the desktop while background activity is still visible. For a blank background, run xtrlock -b. To unlock screen, directly enter your password. Very minimal and light.
  • i3lock: another desktop session locking utility from the i3 tiling window manager package.

3 thoughts on “vlock: lock your terminal (or system)”

Leave a Reply

Your email address will not be published. Required fields are marked *