Catnoo
Notes de paramétrage de postes de travail, et autres vicissitudes ...

Accueil > Linux - divers > linux - console - réduction du nombre de tty

linux - console - réduction du nombre de tty

mercredi 6 août 2014, par Lucien-Henry

Car cela ne sert pas forcément à grand chose d’avoir 6 tty, on les passe à 2 .....

Le principe global est de désactiver le respawn de tty.
Même sur machine un peu performante (Core 2 Quad 9650), on ressent une réactivité plus grande de la machine.

Sous Debian (pour Raspberry par exemple) :

root@raspberrypi:/etc# cat /etc/inittab | grep tty
# /sbin/getty invocations for the runlevels.
# characters of the device (after "tty").
# 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 --noclear 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
# Example how to put a getty on a serial line (for a terminal)
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
# Example how to put a getty on a modem line.
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
root@raspberrypi:/etc#

On passe en commentaire les lignes 6:23:respawn :/sbin/getty 38400 tty6.
exemple pour Debian

Et sous Ubuntu :

horvath@admlho00:/etc$ find . | grep tty
./init/tty2.conf
./init/tty4.conf~
./init/tty5.conf
./init/tty3.conf
./init/tty6.conf
./init/tty1.conf
./init/tty5.conf~
./init/tty6.conf~
./init/tty4.conf
./init/tty3.conf~

Avec pour modification :

gksudo gedit /etc/init/tty4.conf
# tty4 - getty
#
# This service maintains a getty on tty4 from the point the system is
# started until it is shut down again.

#start on runlevel [23] and (
#            not-container or
#            container CONTAINER=lxc or
#            container CONTAINER=lxc-libvirt)

#stop on runlevel [!23]

##21/07/2014
##respawn
##exec /sbin/getty -8 38400 tty4

Voir en ligne : TTY inutiles

SPIP | | Plan du site | Suivre la vie du site RSS 2.0
Habillage visuel © digitalnature sous Licence GPL