Linux Small Knowledge Terminal

Source: Internet
Author: User

(1) Linux default a total of 6 virtual terminals, these 6 dummy terminal memory, the user use, when the process hangs, you can use ALT+FN (n corresponding to 1-6) key combination switch Another terminal, find the process number to kill the process, such as, You can see that there are 6 virtual terminals.

[[email protected]~] #ps aux | grep TTY
Root 2419 0.0 0.0 4064 532 tty4 ss+ Jun17 0:00/sbin/mingetty/dev/tty4
Root 2421 0.0 0.0 4064 536 tty5 ss+ Jun17 0:00/sbin/mingetty/dev/tty5
Root 2423 0.0 0.0 4064 532 tty6 ss+ Jun17 0:00/sbin/mingetty/dev/tty6
Root 16423 0.0 0.0 4064 528 tty1 ss+ 11:06 0:00/sbin/mingetty/dev/tty1
Root 16424 0.0 0.0 4064 532 tty2 ss+ 11:06 0:00/sbin/mingetty/dev/tty2
Root 16425 0.0 0.0 4064 532 tty3 ss+ 11:06 0:00/sbin/mingetty/dev/tty3

(2) This virtual terminal can modify the number of virtual terminals in the configuration file

[[Email protected] ~] #vim/etc/init/start-ttys.conf
ENV Active_consoles=/dev/tty[1-6]//For example [1-6] changed to [1-2]

[Email protected] ~]# Vim/etc/sysconfig/init

ACTIVE_CONSOLES=/DEV/TTY[1-6]//change [1-6] to [1-2]

[[Email protected] ~] #reboot

[[Email protected] ~]# PS aux | grep TTY
Root 1690 0.0 0.0 4064 536 tty1 ss+ 20:24 0:00/sbin/mingetty/dev/tty1
Root 1692 0.0 0.0 4064 528 tty2 ss+ 20:24 0:00/sbin/mingetty/dev/tty2

(3) See how many terminals are currently in use

Who, W, uptime can view several terminals being occupied, but W can display more information

[Email protected] ~]# W
20:32:22 up 8 min, 1 user, load average:0.00, 0.02, 0.01

From the last boot to the current amount of time, a user, the load value is: 5 minutes, 10 minutes, 15 minutes

USER TTY from [email protected] IDLE jcpu PCPU
Root pts/0 192.168.11.1 20:25 0.00s 0.12s 0.03s W

Who the user is, which terminal to occupy, where to come from, CPU-related values, what the action is

[email protected] ~]# who
Root pts/0 2016-06-21 20:25 (192.168.11.1)
[Email protected] ~]# uptime
20:32:46 up 8 min, 1 user, load average:0.00, 0.02, 0.00






This article is from the "11050780" blog, please be sure to keep this source http://11060780.blog.51cto.com/11050780/1791337

Linux Small Knowledge Terminal

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.