How to increase/Decrease Local Virtual consoles?

I m tring to figure out the option where i can increase/Decrease the count for local virtual consoles(vtys).

I can able to take upto 6 vtys using (left alt+(F1-F6))

But is there any way i can increase the count ?

One more query
even though i can only take tty upto tty6 why there are tty entries in /etc/securetty file ranging from 1-11(Noob about tty)

This is a Linux thing, not a UNIX one, by the way.

Try ctrl-alt-f8. Do you get a blank screen? It wouldn't switch you to a terminal that doesn't exist, so a blank screen means you have an 8th terminal. It's just not used by anything.

I think there's a hardcoded 12 terminals, one for each function key, handled by the 'vga console' device driver inside the kernel itself. It's somewhat arbitrary and not likely to change. I think even the switching behavior is mostly hardcoded.

But beyond that, they're just devices. What things talk to what devices depends on your system. On my server:

#
# /etc/inittab:  This file describes how the INIT process should set up
#                the system in a certain run-level.
#
# Author:  Miquel van Smoorenburg, <miquels@cistron.nl>
# Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
# Modified by:  Daniel Robbins, <drobbins@gentoo.org>
# Modified by:  Martin Schlemmer, <azarah@gentoo.org>
#
# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/files/inittab,v 1.5 2005/12/22 02:03:23 vapier Exp $

# Default runlevel.
id:3:initdefault:

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit

# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/rc boot

l0:0:wait:/sbin/rc shutdown
l1:S1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
l4:4:wait:/sbin/rc default
l5:5:wait:/sbin/rc default
l6:6:wait:/sbin/rc reboot
#z6:6:respawn:/sbin/sulogin

# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux

# What to do at the "Three Finger Salute".
ca:12345:ctrlaltdel:/sbin/shutdown -r now

# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
x:a:once:/etc/X11/startDM.sh

See the part in red? Terminals 1 through 6 have logins because, in runlevels 2 through 5, init runs agetty for them. (In runlevel 1, you only get ctrl-alt-f1, looks like.) If you copy those lines to make entries for tty8-12, they ought to work. Delete the line for tty6 and you won't get a login prompt on ctrl-alt-f6 next reboot.

Traditionally you get 1-6 as terminal logins, the 7th is saved for your X server(you can switch in and out of GUI just by switching consoles), and the rest are left for custom uses.

So what's your system?

1 Like

As Corona said, this REEEEALLY depends what flavor of linux + version you're running. For example, if you're running a recent version of Fedora, you won't see anything like that in /etc/inittab. (However, if your inittab does look like that, I can confirm that there's nothing wrong with adding additional respawn lines for higher numbered ttys.)

In other news: chvt is the command you want to switch consoles, especially if you start processes on ones higher than tty12. :slight_smile:

1 Like