Start a new session with the name mysession
sessions
// what it does
The `-s` flag sets the session name at creation time instead of accepting the default numeric index. A named session is far easier to target later with `attach -t mysession` or `kill-session -t mysession`, and the name shows in the status bar and `tmux ls` output. Use this whenever you'll have more than one session running.
// shell
$ tmux new -s mysession// tmux command
: new -s mysession// gotcha
The name must be unique — if a session called `mysession` already exists, tmux aborts with `duplicate session: mysession` rather than attaching. Use `new-session -A -s` if you want attach-or-create behavior instead.