{
    "mode": "man",
    "parameter": "OPENVT",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/OPENVT/1/json",
    "generated": "2026-06-15T13:11:03Z",
    "synopsis": "openvt [-c vtnumber] [OPTIONS] [--] command",
    "sections": {
        "NAME": {
            "content": "openvt - start a program on a new virtual terminal (VT).\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "openvt [-c vtnumber] [OPTIONS] [--] command\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "openvt  will find the first available VT, and run on it the given command with the given com‐‐\nmand options , standard input, output and error are directed to that  terminal.  The  current\nsearch  path  ($PATH)  is used to find the requested command. If no command is specified then\nthe environment variable $SHELL is used.\n\nOPTIONS\n-c, --console=VTNUMBER\nUse the given VT number and not the first available. Note you must have  write  access\nto the supplied VT for this to work.\n\n-f, --force\nForce opening a VT without checking whether it is already in use.\n\n-e, --exec\nDirectly  execute the given command, without forking.  This option is meant for use in\n/etc/inittab.  If you want to use this feature  in  another  context,  be  aware  that\nopenvt has to be a session leader in order for -e to work.  See setsid(2) or setsid(1)\non how to achieve this.\n\n-s, --switch\nSwitch to the new VT when starting the command. The VT of the new command will be made\nthe new current VT.\n\n-u, --user\nFigure  out  the  owner of the current VT, and run login as that user.  Suitable to be\ncalled by init. Shouldn't be used with -c or -l.\n\n-l, --login\nMake the command a login shell. A - is prepended to the name of the command to be exe‐\ncuted.\n\n-v, --verbose\nBe a bit more verbose.\n\n-w, --wait\nwait  for  command to complete. If -w and -s are used together then openvt will switch\nback to the controlling terminal when the command completes.\n\n-V, --version\nprint program version and exit.\n\n-h, --help\nshow this text and exit.\n\n--     end of options to openvt.\n",
            "subsections": []
        },
        "NOTE": {
            "content": "If openvt is compiled with a getoptlong() and you wish to set options to the command  to  be\nrun, then you must supply the end of options -- flag before the command.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "openvt can be used to start a shell on the next free VT, by using the command:\n\nopenvt bash\n\n\nTo start the shell as a login shell, use:\n\nopenvt -l bash\n\n\nTo get a long listing you must supply the -- separator:\n\nopenvt -- ls -l\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "Earlier,  openvt was called open.  It was written by Jon Tombs <jon@gtex02.us.es> or <jon@ro‐\nbots.ox.ac.uk>.  The -w idea is from \"sam\".\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "chvt(1), doshell(8), login(1)\n\n\n\nkbd                                          19 Jul 1996                                   OPENVT(1)",
            "subsections": []
        }
    },
    "summary": "openvt - start a program on a new virtual terminal (VT).",
    "flags": [],
    "examples": [
        "openvt can be used to start a shell on the next free VT, by using the command:",
        "openvt bash",
        "To start the shell as a login shell, use:",
        "openvt -l bash",
        "To get a long listing you must supply the -- separator:",
        "openvt -- ls -l"
    ],
    "see_also": [
        {
            "name": "chvt",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/chvt/1/json"
        },
        {
            "name": "doshell",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/doshell/8/json"
        },
        {
            "name": "login",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/login/1/json"
        }
    ]
}