When performing Linux multi-terminal operation, if synchronization between different terminals can be realized, the same operation effect can be displayed on each terminal, which can save a lot of time and the operation method is also very simple. Everyone introduces the method of synchronizing between different terminals of Linux.
must install software
#yum install tcl expect
(1) check the current location of terminal number:
[root @ localhost shell] # w
17:59:31 up 9:47, 5 users, load average: 0.06, 0.02, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
Root tty3 - 08:15 9:44m 0.75s 0.75s. /xrgsu -a
root tty1 :0 17:08 9:47m 9.41s 9.41s /usr/bin/Xorg :
root pts/0 :0.0 17:25 0.00s 3.04s 0.00sw
root pts/1 :0.0 17:33 10:04 0.11s 0.11s bash
root pts/3 :0.0 17:39 46.00s 0.02s 0.02s /bin/bash
(2) Initiate a synchronization command to the specified terminal as the root user:
=========pts/0 Initiating an operation to pts/1 ====== ==
[root@localhost shell]# kibitz -tty pts/1 root
ask root to type: kibitz -4010
======== =pts/1 Received request =============
[root@localhost shell]#
Message from [email protected] on pts/0 At 18:02. . .
Can we talk? Run: kibitz -4010
EOF
(3) Press Enter, type kibitz -4010
[root@localhost shell]# kibitz -4010
Escape sequence is ^]
At this point, pts/0 and pts/1 are synchronized, and any terminal can be controlled to display operation information on both sides.
(4) View terminal status again
[root@localhost shell]# w
18:06:10 up 9:54, 5 users, load average: 0.04 , 0.02, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root tty3 - 08:15 9:50m 0.76s 0.76s . /xrgsu -a
root tty1 :0 17:08 9:54m 12.66s 12.66s /usr/bin/Xorg :
root pts/0 :0.0 17:25 1:58 5.41 s 0.00s expect -- /usr/
root pts/1 :0.0 17:33 0.00s 0.11s 0.00s expect -- /usr/
root pts/3 :0.0 17: 39 4:17 0.03s 0.03s /bin/bash
pts/0 and pts/1 have been synchronized by the expect program, and pts/3 is not synchronized.
Previous12Next Total 2 Pages
Many Linux users like to use the mongodb database, a handy database. However, some
There are a lot of Linux users who use the Firefox browser, and the silent request
Linux systems such as Ubuntu or Linux Mint are the main office software. Some versi
In the Linux system, if there is no relevant settings, then close a process, then he terminates, and
Debian boot does not enter the graphical interface method
How to use Linux to periodically delete expired files using the command
How to take a screenshot in the Linux system login interface?
Steps to Add Static Routes to Linux
How to import files from a Docker container to the host
Linxu system uses SSH to report Access Denied. What should I do?
Steps to install IEs4Linux on Ubuntu 12.04
The method of modifying the /etc/profile file in Linux system
How to boot a Linux ISO image file from the hard disk
Understand the reasons, speed up the win7 computer (1)
How to set up the win8 laptop to automatically turn off the touchpad
Win8 shared wireless to achieve mobile phone Internet detailed tutorial
Driving the life What should I do if I lose the driver download driver?
Word2013 method of adding and deleting watermarks
Win7 sound card driver normal computer no sound how to do
Keyboard instead of mouse Alt+Esc key to easily switch window
Optimize Windows XP SP2 with XP-AntiSpy
Use DISM to easily delete win8.1WinSxS redundancy update
Win10 preview version 10074 night mode open method (for night owls custom)