OPENVT(1) General Commands Manual OPENVT(1)

# [NAME](#NAME)

openvt - start a program on a new virtual terminal (VT).

# [SYNOPSIS](#SYNOPSIS)

**openvt** \[-c vtnumber] \[OPTIONS] \[--] command

# [DESCRIPTION](#DESCRIPTION)

**openvt** will find the first available VT, and run on it the given **command** with the given **command options ,** standard input, output and error are directed to that terminal. The current search path ($PATH) is used to find the requested command. If no command is specified then the environment variable $SHELL is used.

## [OPTIONS](#OPTIONS)

[**-c**, **--console**=*VTNUMBER*](#c)

Use the given VT number and not the first available. Note you must have write access to the supplied VT for this to work.

[**-f**, **--force**](#f)

Force opening a VT without checking whether it is already in use.

[**-e**, **--exec**](#e)

Directly execute the given command, without forking. This option is meant for use in */etc/inittab*.

[**-s**, **--switch**](#s)

Switch to the new VT when starting the command. The VT of the new command will be made the new current VT.

[**-u**, **--user**](#u)

Figure out the owner of the current VT, and run login as that user. Suitable to be called by init. Shouldn't be used with *-c* or *-l*. This option refuses to pre-authenticate root and requires a process owned by the VT owner whose controlling terminal is the current VT.

[**-l**, **--login**](#l)

Make the command a login shell. A - is prepended to the name of the command to be executed.

[**-v**, **--verbose**](#v)

Be a bit more verbose.

[**-w**, **--wait**](#w)

wait for command to complete. If -w and -s are used together then **openvt** will switch back to the controlling terminal when the command completes.

[**-V**, **--version**](#V)

print program version and exit.

[**-h**, **--help**](#h)

show this text and exit.

**--**

end of options to **openvt**.

# [NOTE](#NOTE)

If **openvt** is compiled with a getopt\_long() and you wish to set options to the command to be run, then you must supply the end of options -- flag before the command.

The **-u** option uses **login -f** and therefore bypasses normal password authentication for the detected user. It is intended only for controlled init or keyboard-request configurations. Use a normal authenticated login command when authentication is required.

# [EXAMPLES](#EXAMPLES)

**openvt** can be used to start a shell on the next free VT, by using the command:

[*openvt bash*](#openvt)

[To start the shell as a login shell, use:](#To)

[*openvt -l bash*](#openvt~2)

[To get a long listing you must supply the -- separator:](#To~2)

[*openvt -- ls -l*](#openvt~3)

# [HISTORY](#HISTORY)

Earlier, **openvt** was called **open**. It was written by Jon Tombs &lt;jon@gtex02.us.es&gt; or &lt;jon@robots.ox.ac.uk&gt;. The *-w* idea is from "sam".

# [SEE ALSO](#SEE_ALSO)

[**chvt**(1)](/man/os/kbd/chvt.1), [**deallocvt**(1)](/man/os/kbd/deallocvt.1), [**vlock**(1)](/man/os/kbd/vlock.1), [**login**(1)](/man/os/kbd/login.1)

24 October 2024 kbd

---

Document: openvt(1) from kbd 2.10.0-r4 (Chainguard OS)
Source: https://github.com/legionus/kbd
