Sometimes, when working with multiple windows, it’d be easier to name them for easier reference. For instance, you have this default window in the window listing:
(0) - 0: 1 windows (attached)
(1) └─> 0: [tmux]*
To rename the default window, press ctrl+b then ,. It will prompt you to enter a new name. The window listing will be:
(0) - 0: 1 windows (attached)
(1) └─> 0: code*
Now, for the new window, you can create and set a name with it by using this command, where test is the new window’s name:
tmux new-window -n test
Window listing shows the new window with its name:
(0) - 0: 2 windows (attached)
(1) ├─> 0: code-
(2) └─> 1: test*