meta name="geo.region" content="US" /> Tmux Easy Guide For Beginners - WinDow Tips

Tmux Easy Guide For Beginners

What is Tmux?

Tmux is a multiplexer terminal. In other words, this means you can start a Tmux session and open many Tmux windows in one session at once.


Each Tmux window is one full screen and can be divided into several panels (split).

With Tmux you can easily changing multiple programs in one terminal.

Tmux sessions are persistent, which means that programs running on Tmux will continue to run even if your terminal is accidentally closed.

All commands in Tmux start with a prefix which by default is ctrl + b

Install Tmux

You can easily install Tmux using the package manager from the distribution options you use.

Install Tmux on Ubuntu / Debian

 sudo apt install tmux 

Install Tmux on CentOS / Fedora

 sudo yum install tmux 

Install Tmux on macOS

 brew install tmux 

Start your First Tmux Session

To start the first Tmux session, it’s very easy, type tmux in your terminal console.

 tmux 

This will create a new session, create a new window and start a shell in that window.

When you are in Tmux you will get a status line at the bottom of the screen.


This will inform you of the current session.

You can now run your first Tmux command. For example, to get the whole list of all commands that can be run you can press this button on the keyboard:

 Ctrl + b? 

Create a new Tmux session and give it a name

Tmux session is given a numeric name (0/1/2 / etc) by default. Naming a session will certainly be very helpful when you run many Tmux sessions.

To create a new Tmux session and give it a name at once you can run commands tmux with additional arguments:

 tmux new -s name_session 

Surely this is a very good idea when you are describing the session name.

Tmux Windows and Panels

When you start a new Tmux session, by default it will create a Tmux window or window with a shell in it

To create a Tmux window with a shell type the following button Ctrl + bc .

All Tmux window lists will appear below the screen.

Below are some of the commands that are usually used when using Tmux with windows and its panels.

Ctrl + b c Creating a new window (with shell)
Ctrl + b w Select a window from the existing list
Ctrl + b 0 Switch to window 0
Ctrl + b , Rename the current window
Ctrl + b % Divide the currently running panel horizontally into two panels
Ctrl + b " Split panels that are running vertically
Ctrl + b o Go to the next panel
Ctrl + b ; Switch between the panel that is currently running and the next panel
Ctrl + b x Close the panel that is currently running

Conclusion

In this tutorial, you have learned how to use Tmux. To be able to enjoy the benefits, you must continue to get used to the above command.
You can start training by trying a new Tmux session, giving it a session name, switching between Tmux windows, and dividing the panel horizontally and vertical.
For complete documentation about Tmux, you can go to the official Tmux documentation on this page.

Other references

You can learn more about this Tmux through a video tutorial, here is one of my favorite video tutorials about Tmux.

Hopefully this article is useful, don’t forget to share if this helps you get to know Tmux. Regards.

0 Response to "Tmux Easy Guide For Beginners"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel