GNU Screen is a powerful terminal emulator and window manager for Linux. It can be used to run multiple programs at the same time, or to manage multiple windows in one place. There are several alternatives to GNU Screen for Linux terminal multitasking. These alternatives can be used in place of GNU Screen, or they can be used in combination with GNU Screen.

  1. gdm: GNOME Display Manager GDM is a popular terminal emulator and window manager for Linux that is similar to GNU Screen. It has a few features that are not available in GNU Screen, such as support for multiple monitors and keyboard/mouse input.
  2. LXDE: TheLinuxXDE Terminal Emulator LXDE is another popular terminal emulator and window manager for Linux that is similar to GNOME Display Manager. LXDE also has some features not available in GNOME Display Manager, such as support for multiple monitors and keyboard/mouse input.

We’ve written about using GNU Screen to multitask in the Linux terminal in the past. GNU Screen is the granddaddy of these programs, but tmux and dvtm+dtach are other solutions you may prefer.

Tmux is an improved rewrite of GNU Screen. Dvtm is a console multiplexer inspired by tiling window managers, and dtach adds the ability to detach from and reattach to dvtm sessions.

Tmux

Use this command to install tmux on Ubuntu:

If you’re using another distribution, you’ll likely find it in your distribution’s package manager.

To launch tmux after installing it, just run the tmux command. Unlike Screen, tmux comes with a status bar by default.

To open an additional terminal window, use the Mod-c keyboard shortcut. The default modifer key combination is Ctrl-b. This means that you’ll have to press Ctrl-b and then c to create a new window.

Each new window you open will appear in the status bar. By default, tmux only shows one window on the screen at a time.

Here are some important keyboard shortcuts to get you started:

Mod-X – Kill the current terminal.

Mod-n – Focus next window.

Mod-p – Focus previous window.

Mod-# – Focus the specified window, where # is a number between 0 and 9.

Mod-’ – Prompt for a window to select.

Mod-% – Split the current window into two horizontally.

Mod-” – Split the current window into two vertically

To detach from the current session, use the Mod-d keyboard shortcut.

To reattach to a session, run the following command:

For more keyboard shortcuts, run the man tmux command or read tmux’s manual on the web.

Dvtm & Dtach

Unlike GNU Screen and tmux, dvtm doesn’t allow you to disconnect and reattach to sessions. You’ll have to run dvtm with dtach to detach from and reattach to your sessions.

Run this command to install dvtm and dtach on Ubuntu:

These programs should be available in other distribution’s software repositories, too.

Run the dvtm command to launch dvtm. You’ll see a single terminal window.

To open additional terminal windows, use the Mod-c keyboard shortcut. The default modifier key combination is Ctrl-g. This means that you’ll need to press Ctrl-g and then c to open a new terminal window.

Like a tiling window manager, dvtm will lay out the terminal windows automatically. Unlike the other utilities, it displays them all on the screen by default.

Here are some important keyboard shortcuts to get you started:

Mod-x – Close the current window.

Mod-j – Focus next window.

Mod-k – Focus previous window.

Mod-# – Focus the specified window, where # is the number of the window.

Mod-q – Quit dvtm.

For a full list, run the man dvtm command or check out dvtm’s manual page on the web.

Dvtm also supports the mouse. For example, you can click one of the windows to select it.

To detach from a dvtm session and reattach to it later, you’ll have to run it with the dtach command. To launch dvtm with dtach, use the following command:

To detach from a dvtm session that’s been started with dtach, use the Ctrl-\ keyboard shortcut.

To reattach to your dvtm session later, use the following command:

You can use dtach to run, detach from, and reattach to other applications, too.

You may also want to check out byobu, which enhances GNU Screen.