tmux 1.4 发布 控制台窗口管理器


www.129028.com金沙 1

tmux 是一个与 GNU screen 类似的程序,可作为后者的替代品使用。tmux 采用 BSD 许可授权,其最新版本(当前是 0.5)的源代码可从 SourceForge 网站下载。

screen : linux 技巧:使用 screen 管理你的远程会话

  • Each screen itself can be think as a program that manage multiple shell window
  • Each screen session is independent to each other
  • it is possible to create nested screen session
  • From terminal (outside a screen session), we can:

    • start a screen session by using 'screen command'
    • re-attach to a screen session by using 'screen -r' command
      if multiple screen session is opened, then need to select the one we want to attach:
      screen -r
  • Within screen session, we can:

    • all the command within screen session compose of "Ctrl+a+other":
    • Note: "Ctrl+a+..." will not work outside a screen session

    other includes:
    c: create a screen
    n: next window
    d: detach from screen
    M: monitor screen, getting alert
    x: lock current screen

如上图所示,启动 tmux 后,在窗口底部有状态行显示,其中包括已创建的窗口列表、当前窗口(使用 * 表示)等。


-------- using session --------

  • create new session:
    tmux new -s session-name

  • list all session:
    tmux -ls

  • attach a session:
    tmux a -t kafka_server

  • detach current session (within tmux session):
    tmux detach Or: Ctrl-b d

  • kill a session:
    tmux kill-session -t session-name

---------- using window -----------
Ctrl-b c # create new window
Ctrl-b n/p # move to next/previous window

---------- using pane ----------

  • split:
    Ctrl-b % # horizaontally
    Ctrl-b " # vertically


tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname


tmux a  #  (or at, or attach)

attach to named:

tmux a -t myname

list sessions:

tmux ls

<a name="killSessions"></a>kill session:

tmux kill-session -t myname

<a name="killAllSessions"></a>Kill all the tmux sessions:

tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill

In tmux, hit the prefix ctrl+b (my modified prefix is ctrl+a) and then:

  1. Window bell reporting has been fixed.

  2. This release prevents the server from dying when switching into copy mode when already in a different mode.

  3. It avoids crashing in copy mode... if the screen size is too small for the indicator.

  4. A new server option: exit-unattached.

  5. A new session option: destroy-unattached.

  6. New command: last-pane.

  7. A new window option (monitor-silence) and session option (visual-silence).

  8. Prompt history is now global instead of per-client.

  9. Environment variables are retrieved from the global environment rather than getenv(3).

  10. New window options: other-pane-{height,width}.

  11. Additional minor bugs have been fixed


:new<CR>  new session
s  list sessions
$  name session


<a name="WindowsTabs"></a>Windows (tabs)

c  create window
w  list windows
n  next window
p  previous window
f  find window
,  name window
&  kill window

<a name="PanesSplits"></a>Panes (splits)

%  vertical split
"  horizontal split

o  swap panes
q  show pane numbers
x  kill pane
+  break pane into window (e.g. to select text by mouse to copy)
-  restore pane from window
⍽  space - toggle between layouts
<prefix> q (Show pane numbers, when the numbers show up type the key to goto that pane)
<prefix> { (Move the current pane left)
<prefix> } (Move the current pane right)
<prefix> z toggle pane zoom

<a name="syncPanes"></a>Sync Panes

You can do this by switching to the appropriate window, typing your Tmux prefix (commonly Ctrl-B or Ctrl-A) and then a colon to bring up a Tmux command line, and typing:

:setw synchronize-panes

You can optionally add on or off to specify which state you want; otherwise the option is simply toggled. This option is specific to one window, so it won’t change the way your other sessions or windows operate. When you’re done, toggle it off again by repeating the command. tip source

本文由www.129028.com金沙发布于操作系统,转载请注明出处:tmux 1.4 发布 控制台窗口管理器


Axon推出兼容Mac www.129028.com金沙OS X平板电脑Haptic

据外国媒体报道,日前,Axon Logic公司专为移植安装Mac OSX设计的Haptic平板机终于开始接受预定。尽管由于授权方面的限...


Win7图形界面设计受苹果Mac OS X启发



www.129028.com金沙小型Linux发行版Puppy Linux 5.0 Wary发布

Puppy Linux 是个相当小巧的 Linux发行版,虽然它只有几十MB的大小,但它自带了大量的描扫仪、打印机、数码相机的驱动...


2.0.1www.129028.com金沙 Mac OS X