new-session [-d] [-n window-name] [-s session-name] [-t target-session] [-x width] [-y height]
Create a new session with name session-name.
The new session is attached to the current terminal unless -d is given. window-name and
shell-command are the name of and shell command to execute in the initial window. If -d is used,
-x and -y specify the size of the initial window (80 by 24 if not given).
If run from a terminal, any termios(4) special characters are saved and used for new windows in the
If -t is given, the new session is grouped with target-session. This means they share the same set
of windows - all windows from target-session are linked to the new session and any subsequent new
windows or windows being closed are applied to both sessions. The current and previous window and
any session options remain independent and either session may be killed without affecting the
other. Giving -n or shell-command are invalid if -t is used.
target-session is either the name of a session (as listed by the list-sessions command) or the name of a
client with the same syntax as target-client, in which case the session attached to the client is used.
When looking for the session name, tmux initially searches for an exact match; if none is found, the
session names are checked for any for which target-session is a prefix or for which it matches as an
fnmatch(3) pattern. If a single match is found, it is used as the target session; multiple matches produce
an error. If a session is omitted, the current session is used if available; if no current session is
available, the most recently used is chosen.
target-window specifies a window in the form session:window. session follows the same rules as for
target-session, and window is looked for in order: as a window index, for example mysession:1; as an exact
window name, such as mysession:mywindow; then as an fnmatch(3) pattern or the start of a window name, such
as mysession:mywin* or mysession:mywin. An empty window name specifies the next unused index if
appropriate (for example the new-window and link-window commands) otherwise the current window in session
is chosen. The special character ‘!’ uses the last (previously current) window, or ‘+’ and ‘-’ are the
next window or the previous window by number. When the argument does not contain a colon, tmux first
attempts to parse it as window; if that fails, an attempt is made to match a session.
target-pane takes a similar form to target-window but with the optional addition of a period followed by a
pane index, for example: mysession:mywindow.1. If the pane index is omitted, the currently active pane in
the specified window is used. If neither a colon nor period appears, tmux first attempts to use the
argument as a pane index; if that fails, it is looked up as for target-window. A ‘+’ or ‘-’ indicate the
next or previous pane index, respectively. One of the strings top, bottom, left, right, top-left,
top-right, bottom-left or bottom-right may be used instead of a pane index.