CentOS6.X disable TTY method

Source: Internet
Author: User
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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.