Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’m always surprised to see that there are so many professional developers who never tried tmux and don’t really understand why a terminal multiplexer would be useful. I’m in tmux all day and it’s one of the first things I install on any box. I’ll check out Zellij, but it’s a high bar for me to switch.


raises a hand

My terminal emulator (Konsole) has tabs. It also has tiling features I've never taken the habit to use. It has infinite history and allows me to easily select and copy paste many lines. It has a perfect scrolling behavior: it automatically scrolls, but stops auto scrolling if I scrolled a bit up. I'm used to its keyboard shortcuts to switch tabs. My window manager (KWin) also has tiling-like features when I need to see several terminal sessions at the same time.

I use screen when I need to be able to leave and rejoin later. I almost never need to restore several remote terminal sessions at once, and when I do, I'm happy to just ssh several times.

I feel like my use case is completely covered by the terminal emulator and the WM which are incredibly convenient and efficient. I would expect any layer between this efficient / optimized character display and the programs I run can only add latency. I also quickly feel overwhelmed by a screen full of characters. I think I would miss out on convenience by switching to tmux and it's unclear to me what I would gain.

Happy to be convinced otherwise, though :-)


I use the same setup you use Console etc, but still needs tmux in two different settings. The first one is the same as your usage of screen. The second one is when I teach: I prefer to have my notes and examples on my screen and my presentation on the video projector, but that when I'm live coding or demonstrating something to my students, I have to do it on the big screen which is behind me, and my neck doesn't like that at all ; thanks to tmux I can easily have duplicated terminals on both screens :).


> when I'm live coding or demonstrating something to my students, I have to do it on the big screen which is behind me, and my neck doesn't like that at all ; thanks to tmux I can easily have duplicated terminals on both screens :)

Ah, clever :-)

In the theme of duplicated terminals, once, I used screen so we could share a terminal session remotely on the same server with a colleague to work together.


Oh, sorry for the typo, my phone's keyboard must have "corrected" Konsole to Console. Also, it was supposed to be "but then", not "but that". Sorry.


I got some odd reason why i need tmux: I can't use most "modern" terminal emulators because their input latency is awful and playing RTS games for a decade made me too sensitive to input latency. So i'm using xterm which provides no tabbing but with tmux.


I get this one.

Have you tried Konsole? I've read it's actually one of the fastest, probably not more than xterm though and you'd need to be willing to use KDE software.


I just did, while the input latency is not too bad, i dislike the KDE dependencies and the resource usage.


Have you trier new gen terminal that are GPU accelerated like alacrity or westerm ?


> I can't use most "modern" terminal emulators because their input latency is awful

checkout kitty. its FAST. I used to use iterm and once I tried kitty for a day, iterm felt infuriatingly slow.


If you have GPU support. I don't and it feels sluggier than konsole.

Edit: Also kitty upstream does not offer a manpage.


Yes, it does offer a manpage.


Urxvt?


Kitty is pretty wonderful. It also has most of the features that tmux provides (and a bunch more)


Same here, I use tilix as my new favourite, it has panes & tabs that are just there without having me to remember a complex combo... If I'm remote well I do it the old school way with gnu screen!

I tried a few times to see if I could get any advantage using tmux but always revert back to none at all. To me the scrollback that works 'as expected' without having to remember key combos, and also work with the mouse are a key feature!


Using tmux + tmuxp[1] you can load a pre-configured session and execute arbitrary shell commands for the session, window and pane. I use this to set up shells and editors in the correct dirs (and/or hosts), load lang environments, set env vars and source some zsh aliases and functions that I only want per project. The end result is that I can set up my dev environment (shells with different environments, neovim windows, test runner, various linters I don't wannt integrate into nvim) with a single "tmuxp load <project>".

edit: That is just my personal killer feature, obviously having a terminal setup that is consistent cross platform and great for stream processing is a given.

[1]: https://github.com/tmux-python/tmuxp


I am with you 100% on this (see my separate comment which mirrors yours almost exactly). I like tmux for one reason: I can disconnect from a remote session and reattach later. If my internet connection is interrupted or or I just need to move to a new location, tmux is awesome for this. Beyond that, I really don't get the appeal of implementing terminal multiplexing at that layer. It's a job that can be done much better by a terminal emulator. ssh even has socket multiplexing built in, if you're inclined to use it, but it's only good for a little bit of a performance boost (quicker connection time by reusing an existing socket).


I use the same - Konsole plus KWin tiling with an extension. I do use Konsole's tiling quite a lot though.

The one big advantage of a multiplexer that I can think of is you can disconnect and reconnect from a session. Not something I really need but might be useful.


Tmux is more keyboard oriented, I guess. For example: I can copy and paste from one pane to another without touching the mouse, which is something I think is not possible with Konsole. (I haven't used Konsole or KDE for many years, so that might've changed).

Tmux is more programmable. You can write scripts to automate stuff, for example setting up a layout, etc. with a degree of freedom that is not possible with Konsole.

You are probably fine with your setup, not trying to convince you ;-)

Personally: I just like fancy TUIs. One of the first things I programmed was mIRC scripts, might be because of that.


Just a suggestion, it's easy to capture command or program output with xsel, just by piping into it, for e.g.: 'ls | grep -i "whatever" | xsel -b'.

It is common for me and I have aliases set up for 'ls=ls -lah', g=grep -i' and 'x=xsel -b', so the actual commandline looks like 'ls | g "whatever" | x'. Then I can paste or redirect the result into something else.

There are probably better command line clipboard managers, but I just happened to settle on xsel, and it seems to work pretty well. That, and using alt and number keys to switch between tabs gets me pretty far with my terminal emulator.


I use tmux when SSH'ing to remote boxes, but when working locally I find native terminal panes and tabs to be a better experience. Does tmux provide anything extra to what wezterm/kitty/iterm2 do?


- a tmux session persists on the remote machine, whereas with direct SSH a disconnect loses what you were doing

- a tmux session can be used by multiple people

- with tmux a single command “tmux attach -t someusefulname” restores the layout and all of the commands used, saving a bunch of time and opportunity for error

- tmux has an API, so you can spawn a fully loaded session from scratch with code, rather than by manually doing things or by having a pre-made session (this is soooo underrated, especially if you make it configurable)

Honestly there comes a point where you just redesign the software and have it run in a more automated fashion anyway, but for the odd job that you have to run from time to time it’s very handy to have tmux as a persistent, shareable, configurable scratch space.


You can use the tmux API or a plugin like tmuxp[1] to load a pre-configured session (including running arbitrary shell commands and setting layout).

Using this you could automatically spawn your ssh connections as nested tmux sessions. Obviously this brings some complications, namely that you need to set different prefix keys (or double press prefix) and any non-prefix hotkeys always get sent to your local session. Personally I just configure remote tmux to have only prefixed keybinds and never make any complicated layouts on remote sessions so that having to press <inner-prefix> + <key> doesn't get annoying.

[1]: https://github.com/tmux-python/tmuxp


You can use the same hotkeys to switcch between windows and panes that you use on the ssh box :=)


That’s true, but I do much of my work on remote boxes so it’s a less relevant comparison for me.


Smooth scrollback in a terminal emulator using the mouse/touchpad, with terminal tabs, is way too useful for me to switch to tmux for general use. I use scrollback a lot. Sometimes I search scrollback too, which some terminal emulators do nicely.

If they would just add a tty protocol for good scrollback! :-)

I do use GNU Screen on servers for long-lived sessions. Just because it's more familiar than tmux to me. It's great for persistence, but really annoying to have to use key combos to look through and search the scrollback in Screen sessions, so I tend to log all sessions to files and read the real-time logs with `less -R` and `ripgrep` when I need to look back through session history, even though I could use the Screen interface to do it.


Using the mouse for scrollback within tmux works just fine. You can search in it too. https://asciinema.org/a/rVj7hp8oLOs0Zy43wc06lkyA9


I'm good with letting tiling be a concern of my DE/WM. That's consistent across all the windows I use - I don't have to memorize how tiling works in tmux vs in emacs vs in everything else; I have one setup, I create windows to tile and use tabs to multiplex within tiles. The advantage is that this setup gives me consistent, spacial access to even apps that otherwise won't tile, like Safari or Firefox. All the other advantages of tmux, i.e. that it is programmable etc. are just as true of my WM - I interact with it mostly using scripts I've written, and since this is a local machine I don't care about persistence.


It depends entirely on what you're actually writing!

In some jobs, I always have multiple tmux terminals running. I was about to claim that I have none running right now, but shamefully I have a Mastodon bot that I never productionized running in a tmux on my server.

If you're exclusively a front-end JS developer, it's hard to see how you'd use tmux at all.


Same here, my tmux bindings are hardwired in my brain at this point and switching over would incur a huge drop in productivity at first, not sure I have it in me to switch… floating pane does sound nice though


Are floating panes much different that tmux's pop up windows?


I just use neovim and it’s built in terminal. I can split and navigate and telescope using my habitual nvim key commands.

I haven’t seen anything tmux gains me over this setup (though I’m sure to be missing something).

I do use tmux or screen when sshd into a server, though, just to survive disconnects.


I use tmux with neovim. Typically I just use neovim's tabbing and splits. However, when I'm running multiple processes such as a psql and a dev server I'll have that in another tmux session, usually split in there. Additionally, i can ssh into that neovim session if I switch to my laptop, or just leave it open for later without having to :mks!


> so many professional developers who never tried tmux and don’t really understand why a terminal multiplexer would be useful

because they live in an IDE and don't need a terminal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: