Xshell and securecrt such as SSH use Tmux and Byobu (to solve Byobu is statusline information Panel brush screen problem)

Source: Internet
Author: User

Vim vsplit use it well! Multi-command-line mode, the same makes you have no egg pain!

Here is a look at two terminal multi-console software: Tmux and byobu! This article is mainly introduced by Xshell!

--------------Tmux makes the console simple, practical, and efficient----------------

工欲善其事, its prerequisite, first bigger picture:

  Open Tmux Server >> initialize a session >> create a window >> initialize a panel

Next of course is installed, Sao year not polite, directly copy the installation command:

[Email protected]:~$ sudo apt-get Install Tmux

  

Tmux is also quite simple to use, direct command line:

[Email protected]:~$ Tmux

Enter the following interface, this time you rub squeeze squeeze, of course, less please tap ~

  

Activate the console, press once "Ctrl + B", notice that you can press once, and press multiple times you can only hear the duang~duang~ sound of the system feedback.

  at this point, different typing can give you the "right and left" to ravage. Multiple small panels ( note : The word "Panel" is used here, and is still in the same window!) OS: Little Monkey, you have not flown out of my fingers mountain, do not believe you smell! ):

The first type: "" "horizontal cutting current panel is two blocks;

The second type: "%" to cut the current panel vertically, the effect is as follows:

  

Well, this cock (silk) tender five panels, the terminal in the screen is not enough to cut the time is not let you new, will tell you: Little pane is too small!

(This cock unfortunate by the terminal to despise, advise you test object carefully point to try!) %>_<%)

On the other hand, people who have used vim Dafa know that the screen switch under split directly "Ctrl + w" swish swish.

  So tmux how to switch , the command is simple:

The first step is to activate the console "Ctrl + B" ( Note: All commands must be activated before the console!!!!!! );

The second step, "←" "→" "↑" "↓", yes, you did not read wrong, is the direction of the key.

The third step, "{" "}", the purely forward and backward, according to the panel number, the panel number can be "Q".

  Panel so many, turn off One or two, how to do?

First, switch to the "X" in the panel you want to discard;

The second type of command line:

[Email protected]:~$ exit

Above, belongs to the panel operation part, basically enough to use under the Xshell.

1, about the Multi-window mode, in fact, it is better to open multiple windows with Xshell, otherwise it is easy to forget still open a window of hey. I would like to use you to see the appendix one directly.

2, about the configuration document ~/.TMUX.CONF, is actually also the Tmux command collection, can change itself, more convenient, only need the command line mode "Man Tmux"

Appendix I lists common Commands//PS: You can also command line direct "Ctrl + B" + "?"

--------------Byobu makes console operation more convenient for the atmosphere----------------

according to one of the great gods (with Mac, mom I want, pia! said, another one of the Great gods (Windows black!) Pialapiala operation Imagine not, until you meet him! recommended the Byobu this thing, so, I unsanitary environment General pack B a bit:

[Email protected]:~$ sudo apt-get  install Byobu[email protected]-ubuntu-trusty:~$ sudo apt-get Install screen Byobu

  this cock recommends using the second command directly ~

See the difference in the above two command line!? screen is actually a fullscreen window manager that can multiplex a physical terminal across multiple processes , while Byobu is a hardening of screens.

Start:

[Email protected]  Byobu

Mom, a big wave of status bar Information Blaster screen! Don't ask Ben how the mood, I want to quietly!

  

OK, the SSH terminal is turned on by default to Auto wrap mode in VT mode:

1, Xshell under: File, properties, Terminal->VT mode, initial VT mode, remove Auto Wrap Mode (DECAWM) tick and exit SSH login again

2, SECURECRT under: Options, session options, terminal----and emulation mode remove [line break] tick, exit SSH login again

Drawings: Left x right s,\ (^o^)/~

Well, once again, this cock again in a few new panels, see bright red purple blue ╰ (????) ╯

  

  New:

"F2" Dafa takes you to fly! (This window only, OS: Why do you still have urine smell!) )

  Toggle :

"F3" "F4" into can attack, back can be affected!

  Close the window:

    command line "exit" or direct "Ctrl + D "Uncle, we don't have an appointment!" And when you exit the last window, it means that you closed the session

  To disconnect a link:

"F6" Uncle Goodbye! (。 ⌒∇⌒)

  State preservation and Recovery site:

Byobu based on screen, accordingly, you will find that it disconnects after the link is still saved with the work site, that is, when you restart Byobu, you will find that all the windows are consistent with the broken link!

  Other commands:

In the SSH terminal, the cut window command "Ctrl/shift + F2" cannot take effect (or use native Linux or Mac!). )

  

Appendix II lists Byobu Common shortcut keys, of course, Windows friends want to go up and down together or choose Tmux Bar ~!

----------------------------shameful dividing line one-----------------------------------

Appendix I: Tmux keyboard common shortcut keys

  

Ctrl+b Activates the console, at which point the following keys take effect
System operation ? List all shortcut keys, press Q to return
D Out of the current session so that you can temporarily return to the Shell interface and enter Tmux attach to re-enter the previous session
D Select the session to detach from and use when multiple sessions are open at the same time
CTRL + Z Suspend current session
R Force redraw of non-detached sessions
S Select and switch sessions, use when multiple sessions are open at the same time
: Enter command-line mode, at which point you can enter supported commands, such as Kill-server to shut down the server
[ Enter copy mode; At this point the operation is the same as Vi/emacs, press Q/esc to exit
~ Lists the cue information cache, which contains the various prompts that were previously returned by Tmux
Window operations C Create a new window
& Close the current window
Number keys Switch to the specified window
P Switch to the first window
N Switch to the next window
L Switch between the front and back two windows
W Switch Windows by window list
, Renames the current window so that it is easy to identify
. Modify the current window number; the equivalent of a window reordering
F Finds the specified text in all Windows
Panel operation Divides the current panel into two upper and lower blocks
% Divide the current panel between the left and right two blocks
X Close the current panel
! Places the current panel in a new window, or creates a new window that contains only the current panel
CTRL + ARROW keys Moves the edge in 1 cells to adjust the current panel size
ALT + arrow key Moves the edge in 5 cells to adjust the current panel size
Space Cycle through preset panel layouts, including 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 the cursor to select a panel
{ Forward Displacement Current panel
} Replace the current panel backwards
Alt+o Rotate the panel of the current window counterclockwise
Ctrl+o Rotate the panel of the current window clockwise

Appendix II: Byobu Keyboard shortcuts

F2 Create a new window
f3   move to the previous window
f4   move to the next window
f5   refresh All status notifications
f6   detach from the session and logout
Shift-f6 Detach from the session, but does not logout
F7 Enter Scrollback/search Mode
F8 Rename the current window
F9 Launch the Byobu Configuration Menu
F12 GNU Screen ' s Escape Key
Alt-pageup Scroll back through the history of this window ' s
Alt-pagedown Scroll forward through this window ' s history
Shift-f2 Split the screen horizontally
Ctrl-f2 Split the screen vertically
Shift-f3 Move focus to the next split
Shift-f4 Move focus to the previous split
Shift-f5 Collapse all Splits
Ctrl-f5 Reconnect any SSH/GPG sockets or agents
Shift-f12 Toggle all of Byobu ' s keybindings on or off

----------

PostScript: The second post, blogging really hard. The first thing to consider is to really solve a problem; second, I'm afraid the rookie will come in and dry you, what a bird. Third layout, color considerations;

Indeed tired, homage to the Secret law · Sharing the spirit of the Internet

Xshell and securecrt such as SSH to use Tmux and Byobu (to resolve Byobu the Statusline Information Panel Brush screen problem)

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.