- Published on
Create a nested Tmux Session
Tmux is one of the most useful tool when it comes to using a linux terminal.
Tmux is a terminal multiplexer, it allows a user to access multiple terminals (or windows), each running a separate program, while providing a single screen to work on. Tmux is useful for running more than one command-line program at the same time, increasing productivity and the way you work.
You can create a new tmux session by using the tmux new
command when you are outside of tmux environment. But, in case you are already in a tmux session and want to create a new session from within, it can be done seamlessly by using the below ways-
Create a nested tmux session
Creating a new tmux session from within another tmux session is easy, you just have to run the following command-
Prefix
:new
By default the prefix is Ctrl-B
, so you can create a nested tmux session using-
Ctrl-B
:new
Create a nested tmux session with a name
Creating a new tmux session from within another tmux session is easy, you just have to run the following command-
Prefix
:new -s <name>
By default the prefix is Ctrl-B
, so you can create a nested tmux session using-
Ctrl-B
:new -s <name>
For example, if you want to name your new session myaws
, your keyboard shortcut and command will look like-
Ctrl-B
:new -s myaws
You can quit a tmux session and then create a new tmux session as well, this will also help you create a tmux session.
I hope this tutorial for creating a new tmux session was useful. You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.