Tmux is a terminal multiplexer application that comes in very handy especially if you are using SSH and would like to have multiple terminals. I'm assuming you already know the basics of how to use Tmux and thus in this post I'm simply going to cover using Tmux to maintain your terminal configuration (and keep the programs running inside those terminals) even after disconnecting from SSH.
- Connect via ssh to host and run tmux
- Configure tmux using the CTRL + B, C and CTRL + B, SHIFT % and other commands so that tmux is exactly how you want it.
- Now that Tmux is configured we will keep Tmux running but detach from it by using the CTRL + B, D command.
- Now you can exit your ssh session.
- Next time you reconnect to restore your previous tmux session all you have to do is run tmux a ("a" stands for attach).
That's it! Now you can easily reconnect to a host and have every thing as you left it. Personally, I find this useful for being able to have an always on IRC client and I have a multi-divided pane configured with stats about my server that I can instantly see when I log in.
--
Posted By Conrad Sykes to
The Computer Kid at 8/09/2013 09:07:00 AM