Hacker News new | ask | show | jobs
by sidmitra 3430 days ago
Most of the other comments mention that you can split your screen into tabs and panes. But by far the most important feature of gnu-screen or tmux is the ability to have a shell session running even when you're not logged in. So you can use tmux to start a shell session and run a script(say a command line IRC client) and leave it running. Next you'll just 'detach' from your tmux session and can logout. Your irc client or any number of scripts you started from your tmux session will still be running. You can relogin later and 'attach' to that session and you'll continue where you left off. Infact you can start a tmux session on the server in the office, detach/logout and go home and attach to the same exact screen from home, that you left in the office.

Not to mention you can share your command line shell session/screen with other people!!

2 comments

This is the best feature of tmux. It's worth pointing out here though (in a post about making the terminal act like an IDE), that you can split the terminal into two panes so you can have an editor and a REPL open at the same time similar to many IDE's. There are even some projects that make it easy to pass code between the editor and the REPL in the other pane, though I have never gotten them to work very well.
vim (and emacs) can do that without the need for a terminal multiplexer (though in vim you need to use a "plugin" for it, or, at least, you used to, and I'm sure the new async functionality in vim 8 has improved the experience quite a bit)
this x 1000

tl;dr, use tmux if you ssh into places and hate restarting after losing your connection.

I figured out running screen at the beginning of pretty much every ssh session probably freshman year of college, and it kind of shocks me to hear that people don't regularly do that.