In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use tmux command in Linux, the article is very detailed, has a certain reference value, interested friends must read it!
Linux common command tmux command is a tool that allows people to operate multiple sessions through a window. For students who often operate Linux systems, it is definitely a tool to improve work efficiency.
tmuxTmux is an excellent terminal reuse software, similar to GNU Screen, but from OpenBSD, using the BSD license
The most intuitive advantage of using it is that after logging in to the remote host through a terminal and running tmux, multiple consoles can be opened without "wasting" extra terminals to connect to the remote host;
Features provide a robust, easy-to-use command line interface.
Windows can be split horizontally and vertically.
The panes can be moved and resized freely, or simply utilize one of four preset layouts.
Support UTF-8 encoding and 256 color terminals.
You can copy and paste in multiple buffers.
Windows, sessions, and clients can be selected through interactive menus.
Support cross-window search.
Supports automatic and manual window locking.
Installation #On Mac OS, install by brew install tmux # ubuntu version directly apt-get install sudo apt-get install tmux #centos 7 version directly yum install -y tmux # centos6 version needs to compile install yum install libevent libevent-devel ncurses-devel tar -zvxf tmux-2.3.tar.gz # (download in advance: wget https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz) cd tmux-2.3 ./ configure make && make install shortcut keys Instructions
Ctrl+b
Activate the console; the following keys take effect
system operation
?
List all shortcut keys; press q to return
d
Leave the current session; this will temporarily return to the Shell interface, type tmux attach to re-enter the previous session
D
Select sessions to detach from; use when multiple sessions are open at the same time
Ctrl+z
Suspends the current session
r
Force redraw sessions that are not detached
s
Select and switch sessions; used when multiple sessions are open at the same time
:
Enter command line mode; you can enter supported commands, such as kill-server to shut down the server
[
Enter copy mode; same as vi/emacs, press q/Esc to exit
~
List the hint cache; it contains all the hints returned by tmux
window operation
c
create new windows
&
close the current window
number keys
Switch to specified window
p
Switch to previous window
n
Switch to the next window
l
Switch between front and back windows
w
Switch windows through the window list
,
Rename the current window; this will make it easier to identify
.
Modify the current window number; equivalent to window reordering
f
Finds specified text in all windows
panel operation
"
Divide the current panel into two equal pieces
%
Divide the current panel into left and right halves
x
Close the current panel
!
Place the current panel in a new window; that is, create a new window containing only the current panel
Ctrl+ arrow keys
Move the edge by 1 cell to resize the current panel
Alt+ arrow keys
Move the edge by 5 cells to resize the current panel
Space
Cycle through preset panel layouts; even-horizontal, even-vertical, main-horizontal, main-vertical, tiled
q
Display panel number
o
Select the next panel in the current window
direction key
Move cursor to select panel
{
Replace current panel forward
}
Replace current panel backwards
Alt+o
Rotate the panel of the current window counterclockwise
Ctrl+o
Rotate the current window panel clockwise
1) After entering the tmux panel, be sure to press ctrl+b first, then release, and then press other key combinations to take effect. 2) Several key combinations commonly used:
ctrl+b ? # Display shortcut keys help ctrl+b space bar # Using the next built-in layout, this is interesting, in the case of multiple screens, this will display multiple screens vertically ctrl+b ! # Change the current window to a new one ctrl+b " # Modal Split Window ctrl+b % # Vertical window divider ctrl+b q # Display the number of the divider window ctrl+b o # Skip to the next divider window. Switch between multiple screens ctrl+b up and down keys # Previous and Next Separator Window ctrl+b C-arrow keys # resize the divider window ctrl+b & # Confirm and exit current tmux ctrl+b [ # Copy mode, i.e. move the current screen to the previous position, all other windows are moved forward one. ctrl+b c # Create a new window ctrl+b n # Select the next window ctrl+b l # Last used window ctrl+b p # Select the previous window ctrl+b w # Display and select windows in menu mode ctrl+b s # Display and select sessions as menus. This is commonly used to, you can choose which tmux ctrl+b t to enter # Show the clock. Then press enter to return to shell terminal state ctrl+b d # Leave the current session; this can temporarily return to the Shell interface, enter tmux attach to re-enter the previous session. The above is "How to use tmux command in Linux" All the contents of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.