Skip to main content

Como desabilitar terminais virtuais no linux

Dica rápida de como desabilitar os terminais virtuais (Ctrl+Alt+Fx) no Linux (GNU-Linux para os mais crentes).

No arquivo /etc/inittab, comentar as linhas referentes aos terminais desejados como no exemplo abaixo:

# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6

Ou ainda trocar o parâmetro respaw por off.

:2345:off:/sbin/mingetty tty1