Multiple Terminal Windows

System administrators often need to work on multiple consoles and thus they appreciate the ability to switch from one to another in a snap with a quick keyboard shortcut or mouse click.

Mar 24, 2018  How to split the terminal into multiple screens in Windows 10. March 24, 2018. During my web development, I usually need to run different terminal applications, like webpack, node server, etc. As Windows command prompt does not support tabs, I had to open multiple command prompts, which is.

Tmux Manage Multiple Linux Terminals Inside Single Console

To do this, in GNOME-based desktop Linux distributions you can install a tool called Terminator, which provides an efficient way of splitting a single window into multiple terminals for different tasks.

However, there are other options that you will need to consider, specially if you’re in front of a CLI-only server or if the X Windows System has crashed in your desktop distribution. Additionally, certification programs such as the Linux Foundation Certified System administrator, the Linux Foundation Certified Engineer only provide a command line interface for their respective exams.

In this article we will introduce you to tmux (short for Terminal MUltipleXer), a simple and modern alternative to the well-known GNU screen utility, and will enable you to access and control a number of terminals (or windows) from a single terminal. This tool will work both in a CLI-only environment and within a terminal emulator in a desktop distribution.

In addition, being able to create multiple tmux sessions can help you organize your work into different areas to increase your productivity.

Update: Here is another article about wemux, that improves tmux to make multi-user terminal easier and more powerful. It enables users to start a new wemux server and have other users join in either, read more about it:

Installing tmux Terminal Multiplexer in Linux

To install tmux, you can use your standard package management system.

For CentOS/RHEL/Fedora (included in the base repository):

Debian (from the admin packages section of the stable version) and derivatives:

Once you have installed tmux, let’s take a look at what it has to offer.

Getting Started with tmux Terminal Multiplexer

To start a new tmux session (a container for individual consoles being managed by tmux) named dev, type:

At the bottom of the screen you will see an indicator of the session you’re currently in:

Next, you can:

  1. divide the terminal into as many panes as you want with Ctrl+b+' to split horizontally and Ctrl+b+% to split vertically. Each pane will represent a separate console.
  2. move from one to another with Ctrl+b+left, +up, +right, or +down keyboard arrow, to move in the same direction.
  3. resize a pane, by holding Ctrl+b while you press one of the keyboard arrows in the direction where you want to move the boundaries of the active pane.
  4. show the current time inside the active pane by pressing Ctrl+b+t.
  5. close a pane, by placing the cursor inside the pane that you want to remove and pressing Ctrl+b+x. You will be prompted to confirm this operation.
  6. detach from the current session (thus returning to the regular terminal) by pressing Ctrl+b+d.
  7. create a new session named admin with
  1. detach from the session named admin
  2. reattach to the session named dev with
  1. Switch to admin again with

All the examples above are illustrated in the following screencast. Please take a minute to watch it and practice before proceeding:

Note that when there are no more panes left in a tmux session, such session is terminated.

Windows

Changing tmux Terminal Key Bindings

In tmux, the combination of keys used to perform a certain action is called key bindings. By default, key bindings consists of a combination of the Ctrl key and other(s) key(s), as we explained in the previous section.

If you find the default key bindings used in the preceding examples inconvenient, you can change it and customize it on either 1) a per-user basis (by creating a file named .tmux.conf inside each user’s home directory – do not omit the leading dot in the filename) or 2) system-wide (through /etc/tmux.conf, not present by default).

If both methods are used, the system-wide configuration is overridden by each user’s preferences.

For example, let’s say you want to use Alt+a instead of Ctrl+b, insert the following contents in one of the files mentioned earlier as needed:

After saving changes and restarting tmux, you will be able to use Alt+a+' and Alt+a+t to split the window horizontally and to show the current time inside the active pane, respectively.

The man page of tmux provides additional details and further suggestions for convenient key bindings that I’m sure you’ll find interesting to try.

Summary

In this article we have explained how to use tmux to divide your terminal or console window into multiple panes that you can use for different purposes.

I hope you have found this tool useful (actually, I’d love to hear that!), feel free to drop us a line using the form below. Do the same if you have any comments, questions or suggestions about this article.

Reference: https://tmux.github.io/

Multiple

For a long time Windows 10 hasn’t had a great command line interface. As a result, developers and system admins have installed third-party options to emulate Unix style and other kinds of consoles. And while it’s possible to get a bash shell inside Windows 10 now, many users still prefer a more configurable terminal emulator. Check out the best terminal emulators for Windows 10 below.

1. MobaXterm

Rammed with robust features like X11 servers, a library of plugins, and even its own protocol clients, MobaXterm is a great server tool with myriad Terminal options for those who really want to dig deep (conversely, you may find it a bit bloated if you just want to do lighter Putty work, for example).

It lets you set up remote terminals in SSH, telnet, rlogin and Mosh, and has an intuitive interface that lets you set up multiple SSH taps, split terminals horizontally/vertically, among other quality-of-life features. Naturally, it has all the Unix commands you need too, letting you work much as you would in Linux.

There’s a limited free version of MobaXterm that lets you have up to 12 sessions, two SSH tunnels, and 4 macros (it also has a portable version). If you want the full package, you’ll need to pay $69 for a lifetime right-to-use which removes all the aforementioned limitations.

2. ZOC Terminal

One of the best tools for people needing to access data on Unix accounts from Windows, ZOC Terminal, may not be free ($79.99), but it’s still a great value for more advanced users.

One of its key perks are tabs, so you can have several Terminal sessions going on at once across SSH, telnet, QNX, and other terminals. It’s brimming with commands and is highly customizable to suit your personal terminal-tinkering style.

Its emulations are robust and complete, offering features like mouse and keyboard support, print-through and line graphics. And it’s a cinch to search for specific bits of text in your work, then highlight them.

3. cmder

Linux Multiple Terminal Windows Ssh

cmder is a well-known portable terminal emulator for Windows 10 that was built from the “pure frustration” caused by the lack of a good alternative in Windows. It’s built on top of another well-known console emulator, ConEmu, and enhanced with Clink. Clink extends the power of ConEmu, adding shell features like bash-style completion. It’s broadly compatible, working with msysgit, PowerShell, cygwin and mintty, bringing Unix capabilities to Windows.

Since it’s completely portable, you can run cmder off a USB drive that you use on various machines without installing files on local hard drives, making it a support specialist’s best friend. As a bonus, it ships with the much-loved Monokai color scheme to coordinate your hacking with Sublime Text.

How To Open Terminal In Windows 10

4. ConEmu

ConEmu is a Windows console emulator with tabs, multiple windows and a variety of customization options. Its lineage reaches way back in history: ConEmu was initially created as a companion to Far Manager, a file and archive manager released for Windows in 1996. But despite its age, the software is continuously developed.

The emulator provides a deep menu of settings to tweak and hotkeys to assign, drawing in keyboard warriors from Vim and Emacs. ConEmu in compatible with many of the same popular shells as cmder, like cmd.exe, PowerShell, cygwin, PuTTY and others. If you install a DOS emulator like DosBox, you can run DOS applications in a 64-bit environment. But because ConEmu isn’t a shell, it doesn’t include helpful shell features like remote connections and tab completion. While it retains many die-hard fans, ConEmu might not be the best console emulator for new users.

5. Console

Console is a terminal emulator and console enhancement for Windows 10 that focuses on direct use and simple interaction. It provides full command-line capabilities, and its straight-forward design hides a significant degree of power and customization. It integrates with all the major shells and lets you customize window styles, transparency, fonts and text colors. But Console isn’t as all-spanning as ConEmu, so very advanced users might find themselves limited by the software.

6. Babun

Babun comes with bash and zsh out of the box, providing tools that both beginner and advanced users can use immediately. It’s built on top of Cygwin, porting a Unix-style interface to Windows 10. You can use oh-my-zsh to configure zsh’s wide variety of options, giving you greater control over your shell’s functionality that you’ll get in other applications. It also includes the pact package manager and HTTP proxying out the box.

Terminal

7. Mintty

If you only use Cygwin for your Windows shell, then Mintty is an excellent console emulator. In fact, Mintty is installed as the default terminal emulator. Like the other options on this list, Mintty provides a collection of additional features like drag-and-drop, full screen, copy and paste and theme support. And it also works with MSYS and Msys2.

Conclusion

Cmder is probably the best bet for users looking for a capable but manageable terminal emulator. Users seeking a more powerful experience can get their fix with ConEmu or splash out a bit more for ZOC Terminal.

This article was first published in August 2017 and was updated in June 2019.

The Complete Windows 10 Customization Guide

In this ebook we’ll be exploring the multitude of options to fully customize Windows 10. By the end of this ebook you’ll know how to make Windows 10 your own and become an expert Windows 10 user.