Bootstrap

iterm2 tmux_在实践中使用tmux:iTerm2和tmux

iterm2 tmux

by Alexey Samoshkin

通过阿列克谢·萨莫什金(Alexey Samoshkin)

在实践中使用tmux:iTerm2和tmux (tmux in practice: iTerm2 and tmux)

在本地使用iterm2与tmux的优缺点。 如何设置iTerm2配置文件以覆盖键映射以触发模拟tmux操作 (Benefits and drawbacks of using iterm2 vs tmux locally. How to set up iTerm2 profile to override key mappings to trigger analogue tmux actions)

This is 2nd part of “tmux in practice” post series.

这是“ tmux in实践 ”帖子系列的第二部分。

So you’re using iTerm2 terminal emulator on OSX. And you’ve heard about tmux, and decided to give it a try. Google here, Google there, after a while you grasp concepts like terminal multiplexing, windows, pane splitting, and understand tmux usage on remote machines to persist session state and survive abrupt disconnections.

因此,您正在OSX上使用iTerm2终端仿真器。 而且您听说过tmux,并决定尝试一下。 在这里的Google,在那里的Google,一段时间之后,您将掌握终端多路复用,窗口,窗格拆分等概念,并了解远程计算机上的tmux使用情况,以保持会话状态并避免突然断开。

At some point of time, you might wondering about tmux usage locally.

在某个时间点,您可能想知道本地的tmux使用情况。

“Given iTerm already can create multiple virtual windows inside a single ‘physical’ window, can split, swap and resize panes, do I really need to use tmux on my local machine instead of iTerm?”
“鉴于iTerm已经可以在单个“物理”窗口中创建多个虚拟窗口,可以拆分,交换和调整窗格大小,我真的需要在本地计算机上使用tmux代替iTerm吗?”

When I was learning tmux, I had been returning to same question again and again. It was not clear without some practice. So I’ve decided to give it a try, and today I can share benefits and drawbacks with you.

当我学习tmux时,我一次又一次回到相同的问题。 没有一些实践尚不清楚。 因此,我决定尝试一下,今天我可以与您分享优点和缺点。

iTerm2 vs tmux在本地计算机上的优缺点 (iTerm2 vs tmux on local machine: benefits and drawbacks)

好处: (Benefits:)
  • Named windows. Similar to tabs in iTerm, but you can give them a name

    命名窗口。 与iTerm中的标签相似,但是您可以给它们命名

  • A status line with system-wide information. Includes CPU, memory, online/offline status, battery, user, host, and date time.

    具有系统范围信息的状态行。 包括CPU,内存,在线/离线状态,电池,用户,主机和日期时间。

  • Having status line and set of named windows inside it, I can turn iTerm to full-screen mode. This which allows me to work in a distraction-free environment and also get extra 3 rows. These previously were taken by OSX menu bar, iTerm window frame and iTerm tabs row.<

;