I am fairly familiar with Linux, I’ve been using different distros for some years now and have done some config editing here and there. I am also a web developer and use the terminal quite a lot and so I always stumble on people’s recommendation to use tmux and how good it is, but I never really understood what it does and, in layman’s terms, how can it be useful and for what use cases.

Can you guys please enlight me a bit on this?

Thank you.

Edit: if my phrasing is a bit awkward or confusing I apologize since I am not an English native speaker. (Maybe that’s why I never fully grasped what tmux is from other explanations xD)

Edite: Ok, just to clarify, my original struggle was to understand what made tmux different from using some terminal app and just split the screen xD

  • @iusearchbtw
    cake
    link
    61 year ago

    tmux (and GNU screen, its older predecessor) is a terminal multiplexer, which is a fancy phrase used to describe turning one terminal window into multiple terminal windows. It basically turns a single terminal window into a text-based tiling window manager that lets you run different shells concurrently in a single terminal, easily copy text between them, and have other quality of life improvements over using a single raw terminal.

    Imagine you’re SSH’d into a remote machine. Unless you SSH again from a different terminal at the same time, you’re basically limited to a single terminal, and whatever you’re doing is interrupted if your connection drops. tmux runs on the remote machine, which means that if your connection is interrupted, tmux will continue running exactly as you left it, and you’ll be able to reattach to it using tmux attach.

    Or, imagine your video drivers break and you’re forced to troubleshoot in a raw TTY. tmux will let you have a manpage and a shell open at the same time, or three different directories opened side by side. That’s a slightly more convoluted use case, but the point is that terminal multiplexers make it far more convenient to use the terminal in basically any situation that’s not just running a single short command and leaving.