Linuxtmux study notes

Source: Internet
Author: User
Linuxtmux study notes tmux is known as a substitute for screen. let's see why: it supports pasting/copying between multiple windows, and you can choose to paste the buffer zone, which is not supported by screen. The split screen operation wins. Screen only supports simple up and down split screens. after split screens, ctrl + a + c is required... linux tmux study notes tmux is known as a substitute for screen. let's see why: it supports pasting/copying between multiple windows, and you can choose to paste the buffer zone, which is not supported by screen. The split screen operation wins. Screen only supports simple up and down split screens. after split screens, ctrl + a + c is required to create a new terminal. Screen directly creates a terminal, supports switching between screens/relocate/redefinition of the size, and provides some preset layout www.2cto.com tmux with its own status bar by default, for screen, you also need to manually configure the tmux configuration, which is simpler than screen vi and bind the emac mode to start the tmux: tmux ls: list tmux session tmux attach: attach a tmux session tmux startup parameter:-c: shell-command, such as tmux-c vim-f file: specifies the configuration file. the default value is ~ /. Tmux. conf, or/etc/tmux. conf-L socket-name: specifies the name of the tmux session-u: supports utf-8-V: version www.2cto.com tmux some concepts: A session is a single collection of pseudo terminals under the management of tmux. each session has one or more windows linked to it. A window occupies the entire screen and may be split into rectangular panes, each of which is a separate pseudo terminal (the pty (4) manual page documents Technical details of pseudo termi? Nals ). any number of tmux instances may connect to the same session, and any number of windows may be present in the same session. once all sessions are killed, tmux exits. session: session. a server can contain multiple session windows. a session can contain multiple window pane: panels. a window can contain multiple pane tmux configurations: the default bind-key of tmux is ctrl + B. You can change it to ctrl + a: set-g prefix ^ a unbind ^ B bind a send-prefix, ctrl + a can mark the cursor in terminal to the first line of Vim code set-option-g display-time 4000 set-option-g status-keys vi set-window-option- g mode-keys vi # set default bind-key to ctrl + a set-option-g prefix C-a unbind-key C-B bind-key C-a send-prefix # unbind '"'bind-splitw-v # split into two upper and lower windows # unbind % bind | splitw-h # split into two left and right windows bind k selectp-U # select bind j in the upper pane selectp-D # select bind h selectp-L # select bind l selectp-R in the left pane # select bind-key J resize-pane-D 10 bind-key K resize in the right pane -pane-U 10 bind-key H resize-pane-L 10 bind-key L resize-pane-R 10 bind ^ u swapp-U # switch Ctrl-u bind with the upper pane ^ d swapp-D # exchange Ctrl-d bind with the lower pane ^ u swapp-U # exchange Ctrl-u bind with the upper pane ^ d swapp-D # exchange Ctrl-u bind with the lower pane- d bind m command-prompt "splitw-h 'exec man % '" # customizes the status line # The default value on the left of the status line is good, I have customized the uptime and loadavg: # set-g status-right "# [fg = green] # (uptime. pl) # [default] • # [fg = green] # (cut-d ''-f 1-3/proc/loadavg) # [default] "# set the background and foreground color of the status line in the following two rows: set-g status-bg black set-g status-fg yellow # start the application by default # Some applications can be started by default when tmux is started: # new-s work # Create a session named work, and start mutt # neww rtorrent # start rtorrent # neww vim # start vim # neww sh # selectw-t 1 # window marked with 1 by default
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.