4 ms·
As someone who hasn't invested much time into tmux/screen, what are the benefits of it over just using eg; multiple terminal tabsn or using the terminal's built
by spondyl 8y ago
As someone who hasn't invested much time into tmux/screen, what are the benefits of it over just using eg; multiple terminal tabsn or using the terminal's built in split windowing? I'm sure there's probably a benefit but I dunno what it is
- weavie 8y agoIt persists your session, so if you get disconnected you can just log in again and 'tmux attach' to resume from where you left off. Any long running commands will still be running.
- cerberusss 8y agoBoth tmux and screen allow you to attach/detach. Thus you can log off, and you can pick up your session later. For example, yesterday I logged into a Linux server at DigitalOcean via SSH. I ran tmux, started a long-running job, detached the session. I closed my laptop to go home for lunch. When I returned at my desk, I logged into the server and reattached the tmux session so I could see the results.
- jodrellblank 8y agoIf it's all on one device and no networking, I don't know of any great benefit. But if you sometimes connect to the machine remotely then Tmux allows you to pick up an existing session, e.g. You open tmux on your desktop, open some command line things, then walk away and pull out your laptop or desktop, SSH to your computer, "tmux attach" and have the same session open - and it's open on both devices, both seeing the same updates at the same time, like a terminal-vnc. And you can variously use them to allow two separate users to share the same session, either one controlling and others read-only, or multiple-editing ( https://unix.stackexchange.com/questions/2523/what-are-other-ways-to-share-a-tmux-session-between-two-users https://unix.stackexchange.com/questions/2523/what-are-other... )
- pjungwir 8y agoI agree with everyone else that it's great on remote systems, but the reason I use it locally too is because I can set up all a project's "tabs" with just one command. I have dozen-line scripts for each client/project that will either create or attach to a tmux session, and when creating set up all the windows how I want: setting their names, cd'ing, opening psql, tailing a log, changing the bottom color (green for development, yellow for staging, red for production), etc. For Rails work I typically have separate windows for models, controllers, views, stylesheets, and javascripts. It makes it really easy to get started after a reboot, or just hide projects for a while and bring them back quickly.
- em-bee 8y agooccasionally i need to restart the GUI. using tmux locally is very helpful for that. also sometimes i log into my workstation from remote, like when i am travelling. it's nice to be able to access the running session.
- Lio 8y agoOne useful reason to use it over a terminal is portability. If you're happy mostly working in the terminal then tmux will be the same on every OS your work on even if your favourite terminal isn't available.