Linux Operating System (3): ubuntu installation details of tutorial tmux

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_41554005/article/details/93904075

Installation tmux

sudo apt install tmux

session Session Control

Open tmux

tmux, will automatically enter tmux window, a window of time only partial

View all tmux sessions currently running

tmux ls

Create a session and give name

tmux new -s sessionname

For the session giving a new name

tmux rename-session -t sessionnameorigin sessionnamenew

Closed session

Close session followed by ctrl-d to close or to exit input connected to exit not only on an exit window pane

A selected session departing from tmux

Ctrl + b D after the first but not close (this operation can program hang)
Close the terminal program at this time will not be interrupted, the program will continue to be displayed in the running of the program in this connection after this session, because the tmux process will not end with the close ssh closed will continue to run in the background
(Not just close off ssh is possible)

Reconnect the name of the corresponding session

tmux attach -t sessionname or number

or

tmux a -t demo

Control Window

Create a new window

After the first ctrl + b c

Rename the current window

After the first ctrl + b, changing only the name does not change the number or use the serial number to jump when

Before switching to a window

After the first ctrl + b p

Switch to the next window

After the first ctrl + b n

Switching to a specific window

Ctrl + b after the first number key switch to the number window, the window number is displayed on the lower end of the status bar window

View related Help: view the command

After the first ctrl + b?

window pane control

Left and right pane

After the first ctrl + b%

The upper and lower half of the pane

After the first ctrl + b "

Pane cursor switch

Navigation, such as when used in conjunction navigates left arrow keys to the left of the current pane

Ctrl + b direction to the key

After the columns enlarged to a full-window pane / panes retracted Original Size

After the first ctrl + b z

The pane zoom in / out direction of the arrow

Mouse can be used to modulate

After the columns drag the dividing line with the mouse

Use the mouse

After the first ctrl + b: // prefix After press ctrl + B, then a semicolon: into the command line

set -g mouse on // command line, type the phrase command, Enter on the line

tips:

Copy selected issues

Hold down the Option (Alt) key on the line

Regardless of when or copy selected, are holding down the Shift key, you'll find the familiar button is back

You can also use the keyboard shortcut Shift + Insert the contents of the system clipboard in tmux input.

Tmux selection mode with respect to native (no shift key), using the system selection has a flaw, i.e. when the line memory when the plurality of panels, the content can not be selected in a single panel, then you have to use copy and paste comes tmux the system.

Guess you like

Origin blog.csdn.net/qq_41554005/article/details/93904075