• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Saturday, May 24, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux

How VPS by How VPS
November 2, 2018
in Linux, Operating System
0
0
SHARES
38
VIEWS
Share on FacebookShare on Twitter

Contents

  1. What is vlock?
  2. Installing vlock in Linux
  3. How to use vlock in Linux
    1. vlock common options and usage:

Virtual consoles are very important features of Linux, and they provide a system user a shell prompt to use the system in a non-graphical setup which you can only use on the physical machine but not remotely.

A user can use several virtual console sessions at the same time just by switching form one virtual console to another.

vlock – A Smart Way to Lock User Virtual Console or Terminal in Linux

vlock Lock User Console or Terminal in Linux

In this how to guide, we shall look at how to lock user virtual console or terminal console in Linux systems using vlock program.

What is vlock?

vlock is a utility used to lock one or several user virtual console sessions. vlock is important on a multi user system, it allows users to lock their own sessions while other users can still use the same system via other virtual consoles. Where necessary, the entire console can be locked down and also switching virtual console disabled.

vlock primarily works for console sessions and also has support for locking non-console sessions but this has not been tested fully.

Installing vlock in Linux

To install vlock program on your respective Linux systems, use:

# yum install vlock           [On RHEL / CentOS / Fedora]
$ sudo apt-get install vlock  [On Ubuntu / Debian / Mint]

How to use vlock in Linux

There are few options that you can use with vlock and the general syntax is:

# vlock option
# vlock option plugin
# vlock option -t <timeout> plugin

vlock common options and usage:

1. To lock current virtual console or terminal session of user, run the following command:

# vlock --current
vlock &#8211; A Smart Way to Lock User Virtual Console or Terminal in Linux

Lock User Terminal Session in Linux

The options -c or --current, means lock the current session and it is the default behavior when you run vlock.

2. To lock all your virtual console sessions and also disable virtual console switching, run the command below:

# vlock --all
vlock &#8211; A Smart Way to Lock User Virtual Console or Terminal in Linux

Lock All Linux Terminal Sessions

The options -a or --all, when used, it locks all user’s console sessions and also disables virtual console switching.

These other options can only work when vlock was compiled with plugin support and they include:

3. The options -n or --new, when invoked, it means switch to a new virtual console before user’s console sessions are locked.

# vlock --new

4. The options -s or --disable-sysrq, it disables the SysRq mechanism while virtual consoles are locked by a user and works only when -a or --all is invoked.

# vlock -sa

5. The options -t or --timeout <time_in_seconds>, invoked to set a timeout for screensaver plugin.

# vlock --timeout 5

You can use -h or --help and -v or --version to view help messages and version respectively.

We shall leave it at that and also know that you can include a ~/.vlockrc file which is read by vlock program during system startup and add the environmental variables that you can check in the manaul entry page, especially users of Debian based distros.

To find out more or add any information which may not be included here, simply drop a message below in the comment section.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

How to Add New Disks Using LVM to an Existing Linux System

Next Post

ifconfig vs ip: What’s Difference and Comparing Network Configuration

Next Post

ifconfig vs ip: What’s Difference and Comparing Network Configuration

Leave a Reply Cancel reply

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

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet