It’s possible, and very common, to run multiple, simultaneous commands within a tmux session. We can keep these organized with windows, which are similar to tabs in modern graphical terminal emulators or web browsers.
When we create a new tmux session, the environment sets up an initial window for us. We can create as many as we’d like, and they will persist when we detach and reattach.
Let’s create a new session that has two windows. The first window will have our normal prompt, and the second window will run the top command. We’ll create a named session called “windows,” like this:
$ tmux new -s windows -n shell
By using the -n flag, we tell tmux to name the first window so we can identify it easily.
Now let’s add ...