tmux split into 4 panes

Solution 1:

Briefly, this sequence is what you want:

tmux new-window \; split-window -p 66 \; split-window -d \; split-window -h

The flow is:

  1. tmux new-window: create a window (ok, you wanted a new-session, that does create a window upon startup)
  2. split-window -p 66: allocate bottom two thirds of the vertical space to a secondary pane and focus it
  3. split-window -d: split bottom pane in half, vertically, without focusing the new pane (i.e. focus stays on second – now center – pane)
  4. split-window -h: split center pane in half, horizontally

As for why the \; is needed, check tmux man page:

Multiple commands may be specified together as part of a command sequence. Each command should be separated by spaces and a semicolon; commands are executed sequentially from left to right and lines ending with a backslash continue on to the next line, except when escaped by another backslash. A literal semicolon may be included by escaping it with a backslash (for example, when specifying a command sequence to bind-key).