Start tmux session with specified name
October 14, 2020 ‐ 1 min read
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.