At this point, you will probably have a ton of terminal windows open and you will have trouble finding the one you want. To solve this problem, you can use a terminal multiplexer, a program that allows you to have multiple terminals open in the same terminal window.
There are many terminal multiplexers to choose from, but we recommend tmux.
Starting tmux
To start a new tmux session, you can simply run tmux or tmux new.
You can specify a name for the session using the -s flag. If you don’t specify a name, it will default to “0”. If you already have another tmux session running, the session name will be “1”.
$ tmux new -s MyNewSession

Now you’ll notice a green (your color may vary) bar on the bottom of the terminal. You can use this terminal just like you would a normal terminal, but you probably want to open another terminal…
Creating Panes
You can have multiple panes inside the same window. Each pane will be it’s own separate terminal.
To split your window into two side-by-side panes, you can press CTRL+B, then :, and then type split-window -h. You could also press CTRL+B, then % to do the same.


To split your window into two panes, one on top of the other, the process is similar. Either CTRL+B : then split-window -v or CTRL+B ".

You can do this as many times as you want in different combinations to get the perfect setup for you. Some examples:


Creating Windows
So what happens if you have your panes set up perfectly, but you suddenly need a new window? That’s as easy as CTRL+B : and then new-window. You can even give your window a name new-window -n Testing.


Navigating Panes & Windows
Now, you’re probably asking yourself how you can switch between panes and windows.
To switch between panes, simply press CTRL+B and then press the arrow key in the direction your want your cursor to move. You can also press CTRL+B q to display pane numbers, and then press the number your want to switch to that pane.

To switch between windows, press CTRL+B and then the number corresponding to your window. In the screenshot above, you can see a 0: and a 1: in the window names. Those are your window numbers.
Closing Panes & Windows
To close your active pane, simply type exit or press CTRL+D.
To close your active window, close all of its panes.