Put a Live Clock in the Linux Virtual Console with vcstime

vcstime puts a running clock in the corner of a bare Linux console, useful the moment your desktop and its taskbar clock are not there. It is a small utility from the kbd package that writes straight to the virtual console screen, handy on a text-only machine or mid-maintenance when X is not running.

Allow about five minutes. You need the kbd package, a real Linux virtual console such as /dev/tty1, and elevated privileges. These examples were checked against kbd version 2.6.4-2ubuntu2. The installed manual documents no command-line options: the invocation is simply vcstime.

1. Check that the utility is installed

Find the executable and record the package version:

$ command -v vcstime
/usr/sbin/vcstime
$ dpkg-query -W -f='${Package} ${Version}\n' kbd
kbd 2.6.4-2ubuntu2

Your path or package version may differ. What matters is that command -v finds the program and the package query reports an installed kbd package.

If the command is missing, install kbd through your distribution's normal package manager. Do not copy a binary across from another machine: this utility needs access to that machine's own virtual console devices.

2. Move to a virtual console

Switch to a Linux virtual console with Ctrl+Alt+F3, or another function key if your distribution numbers them differently. Log in, then check the terminal device:

$ tty
/dev/tty3

The exact number does not matter. A result such as /dev/pts/2 is a pseudo-terminal inside a terminal emulator, not a virtual console, and vcstime only ever updates the latter. An SSH session is in the same boat: you are not looking at the physical console the utility writes to.

Checkpoint: Only continue once tty reports a /dev/tty device for the console you actually want to update.

3. Confirm the console status device exists

The program needs write access to /dev/vcsa. Check it before starting anything:

$ ls -l /dev/vcsa
crw-rw---- 1 root tty 7, 128 Sep 11 15:58 /dev/vcsa

Date, ownership and permission bits will vary. What counts is that the path exists as a character device. On some systems it only appears once virtual-console support is available. If it is absent, stop and investigate the host's console and device-management setup: running the command again and again will not conjure the device into existence.

4. Start the clock

Run it with sudo from the virtual console:

$ sudo vcstime

The command keeps running while it updates the time in the upper-right corner. It takes no time value, console number or configuration file. Leave it attached to the console for as long as you want the display live.

Elevated access is required. The manual is explicit that vcstime must run as root so it can write /dev/vcsa. If you are already root, drop sudo. Do not loosen the device's permissions just to dodge the proper privilege mechanism.

There is no useful text output to parse here. Look at the upper-right corner of the console instead: the value shown should track the machine's current local time.

5. Stop it cleanly

Go back to the console where vcstime is running and press Ctrl+C:

^C
$

That stops the process. It does not uninstall the package, change the system clock or touch any persistent configuration. If you switched to another console in the meantime, return to the one running the command before sending the interrupt. As a recovery check, run:

$ pgrep -a vcstime

No output means no matching process was found. A listed process may belong to another console session, so check what it is before you kill anything. Avoid a blind pkill on a shared machine.

6. Diagnose the common failures

If you see an error about /dev/vcsa, check the path and your identity first:

$ id -un
$ stat /dev/vcsa
$ sudo vcstime

A missing device points to the console environment; a permissions error means the command needs the documented root access, which is fixed by running it with sudo, not by permanently loosening the device mode.

If the command starts but no clock appears, check you are viewing the same virtual console whose screen is being updated. A graphical desktop, an SSH session and a terminal emulator can all be open at once while showing a different display. Run tty again and switch to the matching console.

In a container or other headless environment there may be no virtual console at all. This installed command, for instance, returned status 1 here because /dev/vcsa was unavailable in that environment: an environment limitation, not evidence that some other vcstime option exists to fix it. The manual documents no option that redirects the clock to a terminal emulator, file or network session.

Finally, remember this is a display helper, not a time-synchronisation tool. It reads the system time to show it. It does not set the clock, configure NTP or pick a timezone.

Done means