How To Lock Digital Console Periods On Linux


Get real time updates directly on you device, subscribe now.

While you’re engaged on a shared system, you won’t need the opposite customers to sneak peak in your console to know what you’re truly doing. In that case, I do know a easy trick to lock your individual session whereas nonetheless permitting different customers to make use of the system on different digital consoles. Due to Vlock, stands for Virtual Console lock, a command line program to lock a number of periods on the Linux console. If essential, you’ll be able to lock your entire console and disable the digital console switching performance altogether. Vlock is particularly helpful for the shared Linux techniques which have a number of customers with entry to the console.

Putting in Vlock

On Arch-based techniques, the Vlock bundle is changed with kpd bundle which is preinstalled by default, so you needn’t to hassle with set up.

On Debian, Ubuntu, Linux Mint, run the next command to put in Vlock:

$ sudo apt-get set up vlock

On Fedora:

$ sudo dnf set up vlock

On RHEL, CentOS:

$ sudo yum set up vlock

Lock Digital Console Periods On Linux

The overall syntax for Vlock is:

vlock [ -acnshv ] [ -t ] [ plugins… ]

The place,

a – Lock all digital console periods,
c – Lock present digital console session,
n – Change to new empty console earlier than locking all periods,
s – Disable SysRq key mechanism,
t – Specify the timeout for the screensaver plugins,
h – Show assist part,
v – Show model.

Let me present you some examples.

1. Lock present console session

When working Vlock with none arguments, it locks the present console session (TYY) by default. To unlock the session, it’s good to enter both the present person’s password or the foundation password.

$ vlock
vlock 1

Lock present digital console session

You may also use -c flag to lock the present console session.

$ vlock -c

Please notice that this command will solely lock the present console. You’ll be able to swap to different consoles by urgent ALT+F2. For extra particulars about switching between TTYs, refer the next information.

Additionally, if the system has a number of customers, the opposite customers can nonetheless entry their respective TTYs.

2. Lock all console periods

To lock all TTYs on the similar time and in addition disable the digital console switching performance, run:

$ vlock -a
vlock 2

Lock all digital consoles

Once more, to unlock the console periods, simply press ENTER key and sort your present person’s password or root person password.

Please remember that the root person can all the time unlock any vlock session at any time, except disabled at compile time.

three. Change to new digital console earlier than locking all consoles

It’s also attainable to make Vlock to change to new empty digital console from X session earlier than locking all consoles. To take action, use -n flag.

$ vlock -n

four. Disable SysRq mechanism

As it’s possible you’ll know, the Magic SysRq key mechanism permits the customers to carry out some operations when the system freeze. So the customers can unlock the consoles utilizing SysRq. In an effort to stop this, move the -s choice to disable SysRq mechanism. Please keep in mind, this solely works if the -a choice is given.

$ vlock -sa

For extra choices and its utilization, refer the assistance part or the person pages.

$ vlock -h
$ man vlock

Vlock prevents the unauthorized customers from gaining the console entry. In the event you’re in search of a easy console locking mechanism to your Linux machine, Vlock is value checking!

And, that’s all for now. Hope this was helpful. Extra good stuffs to return. Keep tuned!


Thanks for stopping by!

Assist us that will help you:

Have a Good day!!

Source link

Leave A Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More