|
|
|
|
|
by nrclark
2307 days ago
|
|
Have you ever needed to run a long-running job over SSH? If your command is still running and SSH disconnects, your command gets terminated. You can work around this by using nohup like this: `nohup <command> &` to launch your program. Tmux is kind of like nohup, but for the whole shell. If you SSH into a terminal and start tmux, it'll give you a shell that survives disconnect/reconnect. Tmux can also act sort-of like a tiling window manager for your shells. So you could have a few shells open, and maybe split your screen 50/50 between two shells, or 50/25/25 or something. It's a pretty useful program if you spend a lot of your day SSHed into external machines (or if you like to work locally in a full-screen terminal window). It's also got some esoteric keybindings and a steep learning curve and it messes around with your mouse, scrollback, and copy-paste. iTerm2's tmux integration ignores the disconnect/reconnect stuff (although if you reconnect, your session will just "come back" in whatever state it was when you disconnected). The killer feature is that it takes tmux's window-manager functions and maps them onto tabs and windows in the GUI app. This basically makes it look and feel like you're running iTerm from whatever machine you're logged into over SSH, except that what actually happens under the hood is a bunch of tmux magic. |
|