Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Wednesday September 25 2019, @03:43AM   Printer-friendly
from the multitasking dept.

Arthur T Knackerbracket has found the following story:

Tmux is a very powerful terminal multiplexer which is extremely useful especially when you are using the remote server via SSH.

If we want to do multiple tasks simultaneously on the remote server, usually we have to two ways to do it. We could SSH into the remote server and run everything in the background with an ‘&’ at the end of each terminal command. This is problematic if you want to monitor the process of each task. We could also open multiple windows, SSH into the remote server for each window, and run one task for each window. This is good for monitoring all the tasks, but the shortcoming is that you would have to type your SSH login information for each of the windows you opened. Sometimes it is also hard to find which window is doing which task if there are too many windows opened.

Tmux allows the user to create multiple sessions and each session could have multiple terminals. The user would be able to control multiple tasks in multiple windows via Tmux. No more multiple SSH logins anymore. However, Tmux is not very friendly to beginners because you would have to memorize a series of commands required for controlling Tmux. Although Tmux is much useful than a terminal emulator such as Gnome Terminator, many users would just like to use Tmux as a multi-window terminal emulator. However, Tmux does not memorize user settings such as pane layouts, so every time after reboot or restart the Tmux server, all of the user settings will be gone.

In this short tutorial, I am going through some of the basic concepts and commands for Tmux, and how to use a Tmux plugin, which is called Tmux Resurrect, to restore Tmux environment after reboot or Tmux server restart.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1, Offtopic) by fyngyrz on Wednesday September 25 2019, @10:06PM

    by fyngyrz (6567) on Wednesday September 25 2019, @10:06PM (#898787) Journal

    ...the shortcoming is that you would have to type your SSH login information for each of the windows you opened.

    No, you don't have to type in login information every time when you're setting up a multi-shell/screen monitoring system. You can just set up the appropriate SSL keys between your machine and the server, and you can log in without any fuss at all. You can use a one-line shell script on the non-server end to make it just a few chars, too, so it's really easy.

    One reason you would have to type your info every time is if you are concerned that someone else might do it from your machine. However, if that's a risk, you — or your employer — have failed set up your physical security properly... and you've lost your geek security creds anyway. You're not doing regular server security on a freaking portable, are you?

    The other is if you're doing regular secure stuff on a system, or in front of a person, you don't trust — and again, this is not something you should be doing anyway.

    If you're not in your proper secure location on your properly secured machine, you should at least be typing your info anyway (and this random "other" machine wouldn't have your keys, a good thing), so it's not a downside, it's one of the firewalls. But if you're not on your own trusted, physically secure computer... you shouldn't be doing anything because you have no idea if the freaking thing is keylogging you, or what.

    --
    I feel like I'm in season 5 of my life and the writers are
    making ridiculous stuff happen to keep it interesting.

    Starting Score:    1  point
    Moderation   -1  
       Offtopic=1, Total=1
    Extra 'Offtopic' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   1