In CentOSLinux, six consoles are opened by default, which can be accessed by ALT + F1 to ALT + F6. by default, all the six consoles reside in the memory. you can view them using ps-aux: [root @ localhost ~] # Ps-aux | grepttyWarning: badsyntax, perhapsabogus & #39 ;-
In CentOS Linux, six consoles are opened by default, which can be accessed by ALT + F1 to ALT + F6. by default, all the six consoles reside in the memory.Ps-auxYou can view:
[root@localhost ~]# ps -aux | grep ttyWarning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQroot 1048 0.0 0.0 1980 484 tty1 ss+ 04:49 0:00 /sbin/mingetty /dev/tty1root 1050 0.0 0.0 1980 484 tty2 Ss+ 04:49 0:00 /sbin/mingetty /dev/tty2root 1052 0.0 0.0 1980 484 tty3 Ss+ 04:49 0:00 /sbin/mingetty /dev/tty3root 1054 0.0 0.0 1980 484 tty4 Ss+ 04:49 0:00 /sbin/mingetty /dev/tty4root 1056 0.0 0.0 1980 480 tty5 Ss+ 04:49 0:00 /sbin/mingetty /dev/tty5root 1058 0.0 0.0 1980 476 tty6 Ss+ 04:49 0:00 /sbin/mingetty /dev/tty6root 1133 0.0 0.1 4328 728 pts/0 S+ 05:44 0:00 grep tty
In fact, there is no need to use so much, CentOS 6.0 starts from TTY configuration/Etc/inittabChange/Etc/init/start-ttys.conf, Run the following command to change the default 6 TTY to 2:
Change tty [1-6] to tty [1-2].
[root@localhost ~]# vim /etc/init/start-ttys.conf## This service starts the configured number of gettys.start on stopped rc runlevel=[2345]env ACTIVE_CONSOLES=/dev/tty[1-2]env X_TTY=/dev/tty1taskscript . /etc/sysconfig/init for tty in $(echo $ACTIVE_CONSOLES) ; do [ "$RUNLEVEL" = "5" -a "$tty" = "$X_TTY" ] && continue initctl start tty TTY=$tty doneend script
Open/Etc/sysconfig/init
Find
ACTIVE_CONSOLES=/dev/tty[1-6]
To:
ACTIVE_CONSOLES=/dev/tty[1-2]
Restart!