Adjust the number of TTY terminals started by default in CentOS
CentOS starts 6 TTY by default, with Alt + [F1-F6] keys available in the console switching between different terminals, these are not available to manage remote servers via SSH virtual terminal, reduce the number of TTY started to reduce system resource usage.
CentOS5 modify the description of the configuration file to prohibit start of TTY:
123456
Cat/etc/inittab #2: 2345: respawn:/sbin/mingetty tty2 #3: 2345: respawn:/sbin/mingetty tty3 #4: 2345: respawn: /sbin/mingetty tty4 #5: 2345: respawn:/sbin/mingetty tty5 #6: 2345: respawn:/sbin/mingetty tty6
Modify the number of TTY started in CentOS6:
123
Sed-I's/\/dev \/tty \ [1-6 \] // dev \/tty \ [1-1 \]/G'/etc/init/start-ttys.conf sed- i's/\/dev \/tty \ [1-6 \]/\/dev \/tty \ [1-1 \]/G'/etc/sysconfig/init # change to start 1 TTY
Close the specified terminal:
1
Initctl stop tty =/dev/ttyn
Kill a specified end user:
1
Pkill-kill-t ttyn