Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : How do I increase the number of virtual consoles?
Previous: How do I access the virtual consoles?
Next: I've heard of something called FreeBSD-current. How do I run it, and where can I get more information?

7.7. How do I increase the number of virtual consoles?

Edit /etc/ttys and add entries for ``ttyv4'' to ``ttyvc'' after the comment on ``Virtual terminals'' (delete the leading whitespace in the following example):

            # Edit the existing entry for ttyv3 in /etc/ttys and change
            # "off" to "on".
            ttyv3   "/usr/libexec/getty Pc"         cons25  on secure
            ttyv4   "/usr/libexec/getty Pc"         cons25  on secure
            ttyv5   "/usr/libexec/getty Pc"         cons25  on secure
            ttyv6   "/usr/libexec/getty Pc"         cons25  on secure
            ttyv7   "/usr/libexec/getty Pc"         cons25  on secure
            ttyv8   "/usr/libexec/getty Pc"         cons25  on secure
            ttyv9   "/usr/libexec/getty Pc"         cons25  on secure
            ttyva   "/usr/libexec/getty Pc"         cons25  on secure
            ttyvb   "/usr/libexec/getty Pc"         cons25  on secure
          

Use as many or as few as you want. The more virtual terminals you have, the more resources that are used; this can be important if you have 8MB RAM or less. You may also want to change the ``secure'' to ``insecure''.

IMPORTANT NOTE if you want to run X Window, you MUST leave a virtual terminal unused (or turned off). For example, if you want to attach a virtual terminal to all of your twelve Alt-function keys, you can only attach virtual terminals to eleven of them. The last must be left unused, because X Windows will use it, and you will use the last Alt-function key to switch back to X Window (after you have switched from X Window to a virtual console via a Ctrl-Alt-function key). The easiest way to do this is to disable a console by turning it off. For example, if you have a keyboard with twelve function keys, you would change settings for virtual terminal 12 from:

            ttyvb   "/usr/libexec/getty Pc"         cons25  on secure
          
to:
            ttyvb   "/usr/libexec/getty Pc"         cons25  off secure
          

If your keyboard has only ten function keys, you would end up with:

            ttyv9   "/usr/libexec/getty Pc"         cons25  off secure
            ttyva   "/usr/libexec/getty Pc"         cons25  off secure
            ttyvb   "/usr/libexec/getty Pc"         cons25  off secure
          
(You could also just delete these lines.)

Once you have edited /etc/ttys, the next step is to make sure that you have enough virtual terminal devices. The easiest way to do this is:

            cd /dev
            ./MAKEDEV vty12                 # For 12 devices
          

Next, the easiest (and cleanest) way to activate the virtual consoles is to reboot. However, if you really don't want to reboot, you can just shut down X Window and execute (as root):

            kill -HUP 1
          

It's imperative that you completely shut down X Window if it is running, before running this command. If you don't, your system will probably appear to hang/lock up after executing the kill command.


Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : How do I increase the number of virtual consoles?
Previous: How do I access the virtual consoles?
Next: I've heard of something called FreeBSD-current. How do I run it, and where can I get more information?