We continue with the freaks:
If you are used in a certain way to make extensive use of consoles (I include myself) you will have come across that the best option when undertaking certain tasks without throwing a lot of consoles on the desktop is to use a multiplexer that is nothing more than an entity that allows creating a stack of consoles accessible from the same terminal. In the best of cases we have tools such as Gnuscreen which is obviously the best known and longest-lived option. The truth is that in the world of free software if we can find something, they are options to use. We literally have an almost endless range:
This time I want to tell you a little about Tmux
If like me you have Arch just make a pacman -S tmux to install it Users of other distros have them in the same way in the official repos.
Once installed we start typing tmux in a tertmial:
At first glance it is just a terminal waiting for commands to be executed and it certainly is. The first thing to run for this tutorial will be several terminals in a single window, for which we press the key combination:
Control + b Control +%
remaining as follows:
As we will see, the workspace is divided into two first, but we can repeat the process as many times as necessary to achieve as many terminals as we want. Logically, perhaps with so many workspaces, we certainly need to order the arrangement of these terminals in a certain way. For which we press:
NOTE: in the first attempt of this combination of keys, the terminals will be adjusted to have an equal size in dimensions, so you will not see a change of position itself but an arrangement of them.
Control + b Space key
Now we are presented with the case of wanting to go from one terminal to the other, for which we use the logic of the direction of the keys up and down the keyboard. In this case, since we have two terminals one on top of the other, we press:
Control + b Down key (assuming pointer is in terminal above)
Control + b Up key (assuming the pointer is in the bottom terminal)
In the case that we had more terminals, for example one in the from the upper terminal and once being located in the first terminal below we would use the direction logic of the keyboard keys that is:
Control + b Right key
Now, as I mentioned in the input description, Tmux literally creates a stack of sessions in the same terminal. The command for this is:
Control + b c
From this moment on we will have created a new session (part of the stack that I was commenting on) and that we will be able to check by looking at the indicated part of the image (😛). We will see an asterisk changed to the terminal where we find exactly this as a guide. If we want to go back to where we started we press: Control + b p (To return to the previous terminal) Control + bn (To go to the next terminal) We will see the asteriz change places again. Each window is independent so you can divide and modify at will. If we want to close one of the session windows we would have to press: Control + b & In the part indicated in yellow we will see a closing confirmation dialog where we must place Y (to close) or N (to cancel the order) Y / N . staying in the adjacent terminal after having answered the question affirmatively. The question would be how useful do I give this tool? The answers are many, but the one that comes to my mind the fastest is: having several consoles for managing ssh accounts, network analysis, executing commands in a general way and system monitors without leaving a terminal increases the productivity of a person who has to deal with many terminals. In the second part of this introductory tutorial I will explain a little more about the internal configuration of Tmux and other features, although the manual provided by the developers is always available. "Man tmux"
I leave you an additional capture: