tmux new -s session_name -d
To create a new session w/o attaching it.tmux new -s session_name -n window_name
To create a new session and name the first window.send-keys -t session_name:window_index.pane_index 'cmd' C-m
- This command allows us to execute a command in tmux
session_name
, inpand_index
underwindow_index
. C-m
is carriage returnENTER
- For example,
send-keys -t dev:1.2 'cd ~/Documents' C-m
would change the directory to~/Documents
indev
session in pane index2
under window index1
- This command allows us to execute a command in tmux