Note: this wiki is no longer maintained. If you have any questions related to this wiki, please post them on the CrunchBang forums.

Translations of this page?:

ADMIN Disable extra ttys

A tty is just an extra terminal session on your computer. By default, there are 6 of them running and can be accessed by pressing [Ctrl]+[Alt]+[F1] to [F6]

About this HOWTO

This howto is about how to disable extra tty's on your computer.

Crunchbang has 6 tty's enabled, and your X session (the graphical interface) is held on the 7th

You can switch tty's using the Ctrl+Alt+Fx keys (Ctrl+Alt+F1, Ctrl+Alt+F2, etc.).

Switching tty's can be useful if your boot or shutdown stalls, as if you switch to a random tty then back to tty1 (Alt+F1) you will see where your system has hanged

Set the variable

The first thing that needs to be done is change the setting that says how many tty's are available

To do this, you have to edit /etc/inittab

gksudo geany /etc/inittab
You see an entry like this:

1:2345:respawn:/sbin/getty 38400 tty1
2:2345:respawn:/sbin/getty 38400 tty2
3:2345:respawn:/sbin/getty 38400 tty3
4:2345:respawn:/sbin/getty 38400 tty4
5:2345:respawn:/sbin/getty 38400 tty5
6:2345:respawn:/sbin/getty 38400 tty6

Stop the tty's running

now you can edit the tty files to stop them running on system boot. Put a # in front of the tty you want to disable. Do not put a # in front of tty1! Keep at least one more tty active.

1:2345:respawn:/sbin/getty 38400 tty1
2:2345:respawn:/sbin/getty 38400 tty2
#3:2345:respawn:/sbin/getty 38400 tty3
#4:2345:respawn:/sbin/getty 38400 tty4
#5:2345:respawn:/sbin/getty 38400 tty5
#6:2345:respawn:/sbin/getty 38400 tty6

Disallow root login from different consoles

The ”/etc/securetty” file allows you to specify which TTY devices the “root” user is allowed to login . Edit the ”/etc/securetty” file to disable any tty that you do not need by commenting them out (# at the beginning of the line).

Final Note

As I mentioned previously, X is held on the tty7 slot. Note that this does not change, even if you decrease the number of tty's you have.
These instructions are edited - for the sake of completeness - to work on Debian-based #!Statler and #!Waldorf.

 
howto/disable_extra_ttys.txt · Last modified: 2012/05/30 18:18 by machinebacon
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported

Powered by DokuWiki. Hosted by Linode.
Copyright © 2010 CrunchBang Linux.
Proudly powered by Debian GNU/Linux.
Debian is a registered trademark of Software in the Public Interest, Inc.