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

You are viewing a single thread.
View all comments
12 points

To understand why you might want to use tmux try the following:

  1. Open your terminal
  2. Start editing a file with vim or nano but don’t save the file
  3. Close then re-open your terminal

You will have lost your progress, next we can repeat but this time using tmux so you don’t lose your session:

  1. Open your terminal
  2. Start a tmux session using tmux
  3. Start editing a file again using vim or nano
  4. Close and re-open the terminal
  5. Type tmux a to re-attach to the existing session

Note that this time none of your progress is lost.

Aside from enabling you to have a persistent session, tmux also allows you to have multiple terminal panes open so you can do more than one thing at a time in the window, to see what I mean try this:

  1. Open your terminal
  2. Start a new tmux session using tmux
  3. Type top to begin listing processes
  4. Press ctrl b then % to make a new split pane
  5. Enter ls or other terminal commands

You will see that you can use more than one panel to do things. This can be useful for example if you want to watch run tests and also run other commands.

permalink
report
reply
3 points

All of this is way more useful when all you have to work with is a tty or an ssh session. No X? No problem.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.5K

    Monthly active users

  • 6.6K

    Posts

  • 180K

    Comments