19. Setting up More Virtual Terminals
Introduction to FreeBSD

A Virtual Terminal is a Terminal built into the Main Server Console. It allows you to have several screens open at once, however only one screen is visible at a time. By Default there are four Virtual terminals setup, but only three enabled for use.. To switch between them hold down the ALT key and press F2 or F3 (You start out at F1. This will switch you to the second or third Virtual terminal. Now you should have a login screen like the one you just left. There is nothing different about logging in here as opposed to the virtual terminal on F1. To get back to your original screen, hold down the ALT key and press F1

To add more Virtual terminals, you need SuperUser access to the /dev directory. Next you need to run the program MAKEDEV. MAKEDEV is a shell script, so you have to use the sh shell interpreter to execute it. At the command prompt type:

cd /dev

sh MAKEDEV vty16

Note:

(Type MAKEDEV in all CAPS, Capitalization makes a big difference.)

This will create 16 Virtual terminals. They will be accessible with the ALT + F? keys. But Before you can use them, you have to enable them in the /etc/ttys file. Change directories to the /etc/ directory and use vi to edit the /etc/ttys file.

cd /etc

vi ttys

If you are running The X Windows System, you need to leave one of the Virtual Terminals turned off. By default, ttyv4 is turned off.

In the section labeled Virtual Terminals, you need to add a few lines. If you just made 16 virtual terminal devices, you now have 16 virtual terminals to configure. You need to have 16 lines that deal with virtual terminals in the /etc/ttys file; right now you only have 4. You can cut and paste the line that says:

ttyv2 "/usr/libexec/getty Pc" cons25 on secure

Move the cursor to that line and press yy then move the cursor down one line by pressing j and press 12p to paste the line 12 times. Now you have 12 copies of ttyv2, you need to change this, numbering them in HEX. Start numbering them at 4, then 5,6,7,8,9,a,b,c,d,e,f.

When you are done, you should have ttyv1 - ttyvf configured in the /etc/ttys file.

In vi you can do this easily by positioning the cursor over the number you wish to change and pressing r the next key you press will replace that digit, press 4 to start with. Then press j to move down and press r followed by the next number, repeat as necessary.

when you have finished editing, press ESC :wq to save(write) and quit vi Now you will have to restart the init process. You must have SuperUser access. Type: kill -HUP 1

Now you are ready to use your Virtual Terminals.

Return to Table of Contents

Visit the Gifcom