Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Terminal multiplexing tool tmux use     - Disk partition MBR (Linux)

- Ubuntu 14.04 jdk Installation and Configuration (Linux)

- shell script error dirname: invalid option - b (Database)

- Ceph tuning --Journal and tcmalloc (Server)

- FileZilla FTP && TLS connection settings of (Linux)

- Fedora 20 users install the Mate 1.8 desktop (Linux)

- How to display a dialog Bash Shell script (Programming)

- Linux5.8 installed phpMyAdmin was unable to issue related php-mcrypt (Database)

- Comparison of C # and Java (Programming)

- CentOS x86 64bit upgrade to 2.7 Python2.6 (Linux)

- Ubuntu Apache2 setting, problem solving css, pictures, etc. can not be displayed (Server)

- Linux command to view the system status (Linux)

- How to use SHA256 checksum files download (Linux)

- Solaris 10 nagios monitoring system (Linux)

- Why I do not like the Go language style interface (ie Structural Typing) (Programming)

- Linux operating system to solve a serious fault handling (Linux)

- Linux Getting Started tutorial: hard disk partition and to deal with traps (Linux)

- Three easy open source firewall on the Linux platform (Linux)

- Linux iptables firewall and vsftpd to resolve the issue (Linux)

- Enterprise Hadoop cluster architecture - DNS installation (Server)

 
         
  Terminal multiplexing tool tmux use
     
  Add Date : 2016-11-19      
         
       
         
  Tmux role is to reuse the terminal.
1. Start a bash on the server, and run inside tmux
2. Log in via ssh remote server, run tmux attach, it will switch to the bash server on the subsequent operations are in a bash
3. You can open more windows, so that the remote can be the same as in the local use of multiple same bash

If you want to send the command, as follows:
tmux send -t checkpoint ls ENTER
NOTE: checkpoint you've created a good session with tmux name (tmux new -s checkpoint); ls is a shell command; plus ENTER to execute the ls command in this session of the checkpoint.
So you do not have to manually tmux attach to that session, and then manually execute the ls command. It is good to use a script.
If the session has multiple windows:
tmux send -t checkpoint: 0 'mongoose -t 2' ENTER
0 represents the first window.

Combined with parallel-ssh you can use the remote server environment to run the bash command.

Such a scenario is useful. On a single server with criu to a small program checkpoint, require criu and applets run in bash, rather than directly in ssh, otherwise img file checkpoint obtained will contain information related to the terminal associated with the ssh ( session id), so you can not restore it on another server, and that is impossible to achieve migration. And if in bash, and ssh will not have information about, and on another machine you can restore.

tmux Shortcuts

tmux use a lot of shortcuts in the session to control multiple windows, multiple sessions and the like.

Ctrl + b # to activate the console; this time the following keypresses
System Operation
    ? # List all shortcuts; press q to return
    d # departing from the current session; this can temporarily return to Shell interface, enter tmux attach to re-enter the previous session
    D # Select from the session; used when multiple sessions open simultaneously
    Ctrl + z # suspend the current session
    r # redrawn without departing from the mandatory session
    Used in multiple sessions open simultaneously; s # choice and switch sessions
    : # Enter the command line mode; then you can enter commands supported, such as kill-server can shut down the server
    [# Enter the copy mode; this time the same operation as vi / emacs, press q / Esc to exit
    ~ # List message cache; which contains a variety of message before returning tmux
Window Operations
    c # create a new window
    & # Close the current window
    # Numeric keys to switch to the specified window
    p # to switch to the previous window
    n # Switch to the next window
    l # switch back and forth between each other in two windows
    w # through the window list window switch
    # Rename the current window; it is easy to identify
    # Modify the current window number; corresponds to the window to reorder
    f # Find the specified text in all windows
Panel Operation
    "# The current flat panel is divided into two
    % # About the current panel is divided into two levels
    x # close the current panel
    ! # The current panel placed in a new window; that is, a new window that contains only the current panel
    Ctrl + arrow keys # 1 to the cell edge for mobile unit to adjust the size of the current panel
    Alt + arrow keys to # 5 cell edge for mobile unit to adjust the size of the current panel
    Space # in the preset panel layout to cycle; in turn includes even-horizontal, even-vertical, main-horizontal, main-vertical, tiled
    q # Display Panel No.
    o # Select the next panel in the current window
    # Move the cursor arrow keys to select the panel
    {# Forward displacement of the current panel
    } # Rearward displacement of the current panel
    Alt + o # counterclockwise rotation of the current window panel
    Ctrl + o # clockwise rotation of the current window panel
     
         
       
         
  More:      
 
- How to install Wine 1.7.20 under Ubuntu or Linux Mint (Linux)
- Linux, Eclipse flash back and reinstall the JDK methods (Linux)
- Windows 8.1 and Ubuntu 14.04 dual system uninstall Ubuntu Tutorial (Linux)
- pdf.js Tutorial (Linux)
- Function Getting the Linux shell (Programming)
- CentOS 6.4 under PXE + Kickstart unattended operating system installation (Programming)
- Difference between TCP and UDP protocols (Linux)
- Kali Linux resolve GPG error KEYEXPIRED 1425567400 (Linux)
- Linux system using the command line shutdown or restart (Linux)
- Java recognize simple codes (Programming)
- Oracle how to maintain the consistency of read? (Database)
- Articles do not resolve after opening under Ubuntu WordPress setting a fixed link (Server)
- C ++ Fundamentals study notes (Programming)
- Manually compile Hadoop 2.6.0 under Ubuntu 14.04 (Server)
- Usage Linux device tree (Programming)
- How to use the TF / SD card making Exynos 4412 u-boot boot disk in Mac (Linux)
- Cacti monitoring service Nginx (Linux)
- Ubuntu Tutorial: How to Upgrade a New Linux Kernel 3.12.7 on Ubuntu (Linux)
- How to use Git to upload code to GitHub project (Linux)
- Two network security scanning tools under ubuntu (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.