Adjust the number of TTY terminals started by default in CentOS

Source: Internet
Author: User
CentOS starts 6 TTY by default. in the console, you can use the Alt + [F1 & mdash; F6] key to switch between different terminals, using SSH virtual terminal to manage remote servers is not available, which can reduce the number of TTY started to reduce system resource usage. CentOS5 modify the description of the configuration file to prohibit start of TTY: 123456ca

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 TTY=/dev/ttyn

Kill a specified end user:
1
pkill -kill -t ttyn

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.