Linux Essentials Tool Tmux

Source: Internet
Author: User
Tags sessions

Previously introduced the Linux Screen command, today introduced a more powerful terminal tool Tmux.

Tmux is a tool for running multiple terminal sessions in a terminal window. It can basically replace nohup and screen, even more powerful:

    • Screen projects have largely terminated, and there are a lot of problems in the code that are very unstable to use;

    • Tmux is an active project, its code base is constantly updated and its design is better

    • Tmux is using a real client/server model, and screen just simulates the behavior of this model;

    • Tmux can better support the split screen function.

Tmux is not a Linux default configuration and needs to be installed on its own. You can use homebrew to install in Mac OS. Installation Tmux can be done using the Brew install tmux command.

In order to make its own shortcut keys and other software shortcut keys do not interfere with each other, like screen, Tmux provides a shortcut key prefix. When you want to use a shortcut key, you need to press the shortcut key prefix before pressing the shortcut key. The shortcut key prefix used by TMUX is the combination key ctrl-b (press Ctrl and the B key at the same time). For example, if you want to list the sessions in the current Tmux with shortcut keys (the corresponding shortcut is s), then you only need to do the following steps:

    1. Press the combination key Ctrl-b (Tmux shortcut key prefix)

    2. Release the combo key ctrl-b

    3. Press the S key

Tmux's shortcut key prefix is similar to screen, except that screen is ctrl-a, and Tmux is ctrl-b.

Tmux can create multiple sessions, each with multiple windows, and each window can contain multiple panes.

Tmux common commands are as follows, we put ctrl-b shorthand for c-b:

  • Tmux--------------> Create a Tmux session

  • Tmux ls--------------> Show list of Tmux sessions (C-b s)

  • Tmux a-t Digital--------------> select Tmux session

  • C-b C--------------> Create a new Window

  • C-b n--------------> switch to the next window

  • C-b P--------------> switch to previous window

  • C-b L--------------> switch to the last window

  • C-b w--------------> select Open Session in Current window by the up and down key

  • C-b Digital--------------> Jump directly to the window where you press the number

  • C-b &--------------> exit the current Window

  • C-b d--------------> Temporary disconnect session after disconnection, you can also connect the yo:)

  • C-b "--------------> Split out a window (split up and down)

  • C-b%--------------> split out a window (split left and right)

  • C-b o--------------> switch in a small window, suitable for use when two windows

  • C-b (arrow key)--------------> select Small window in the direction, suitable for multiple windows

  • C-b! --------------> Close all small windows

  • C-b x--------------> Close the small window at the current cursor

  • C-b T--------------> Clocks can actually be seen as a screensaver

  • C-b Pageup/pagedown--------------> Scroll up and down to view history; if it is a Mac machine, you can use the command+ up and down arrows to flip the screen, because there are no pageup and PageDown keys. But the actual effect did not see the historical record.

  • C-b,--------------> Modify the current window name

Linux Essentials Tool Tmux

Related Article

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.