its official website,
tmux enables a number of terminals, each running a separate program to be created, accessed and controlled from a single screen.
"But wait!" I hear you say, "I already have iTerm installed on my Mac OS X, which allows me to create new tabs and split window panes. Do I still need to learn tmux?" iTerm is great in that it gives you a slew of features for customizing and making the most out of the terminal. However, once you leave your precious Mac OS X (such as SSHing into a Linux machine), you've lost all your iTerm features.
Tmux, on the other hand, is completely portable, and its features are available from within any UNIX-like command line! Furthermore, there are other advantages of
tmux that trumps the use of a natively installed terminals.
top), while other windows can be used to administer actual commands.
tmuxis a shell program, meaning it can be installed and run directly within the command line. This allows you to run
tmuxon remote servers.
tmuxsessions can be saved in-state as sessions. So if you're at an airport working on important files on a remote server and your flight is about to take off, you can save exactly where you were and come back to it once you've landed.
Before getting to the actual commands, let's install
tmux from either a remote server or your local computer.
If you're running Mac OS X, grab the Homebrew Package Mananger, and run a simple
brew install command.
$ brew install tmux
On Ubuntu, use
apt-get, and for CentOS, use
yum. For arch, use
# Debian based (Ubuntu) $ sudo apt-get install tmux # CentOS or Fedora $ sudo yum install tmux # Arch $ sudo pacman -S tmux
Now if you type
tmux on the command line, you should have a tmux session running, as indicated by a green status bar at the bottom of the window. Before we move on, print out any tmux cheatsheet and tape it to your wall next to the monitor.
tmux separates each terminal interface into three categories: sessions, windows and panes. Panes are parts of a window, while windows make up a session. By separating multiple interfaces in three different layers, we're able to better organize our workspace.
tmux comes with subcommands that are bound to certain keys. Below is the help page, where you can see the list of special keys.
Before typing in any special key, you must input the prefix. By default,
tmux's prefix is Ctrl-b. So for example, if we want to split a window horizontally, we type <Ctrl-b>, then %. There is a way in which we may change the prefix, which we'll discuss later in our configurations lesson. But for now, let's move onto how we can manage panes!
Stretch out your back and relieve your back muscles with inversion therapy. This device counteracts the forces of gravity on the body by decompressing and elongating the spine. By using this product just ten minutes a day, you can be well on your way to improved circulation and posture while relieving muscle aches, back pain and stress.$$ Check price
In this completely revised second edition of the perennial best seller How Linux Works, author Brian Ward makes the concepts behind Linux internals accessible to anyone curious about the inner workings of the operating system. Inside, you'll find the kind of knowledge that normally comes from years of experience doing things the hard way.$ Check price