Start tmux session with specified name

When you start a new tmux session, by default tmux starts naming sessions with a number. So your sessions will be names 0, 1, 3,…

Often I’d like to name my accordingly, related to the project and/or environment that I’m working on. The tmux session I have running now is called blog for example.

You can control the name of the session by starting a new session as follows.

$ tmux new -s blog

The tmux session that will be created is named blog in this case. The -s option is for session, I hope that is easy enough to remember :).

Renaming a tmux sessions is pretty straightforward as well. You can read here how to do so.

Learn more

A great resource for learning more about tmux are its man pages. You can read them online here or from the command-line using the following command:

$ man tmux

Or take a look at this book:

See Also

6 Non-Programming Books for Programmers