vlock 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 usecases for vlock:
- Lock a console session (including virtual)
- 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 -n -s