Alternatives to GNU Screen for Linux Terminal Multitasking
2014-07-29 01:11
337 查看
Tmux
As a rewrite of GNU Screen, tmux offers a variety of improvements. Some of the most important include a client-server model, which allows you to connect to a tmux session from multiple locations, and a cleaner configuration file format. Check out tmux’sFAQ to discover a list of ways it differs from GNU Screen.
Use this command to install tmux on Ubuntu:
sudo apt-get install tmux
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:
tmux attach
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:
sudo apt-get install dvtm dtach
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:
dtach -c /tmp/dvtm-session -r winch dvtm
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:
dtach -a /tmp/dvtm-session -r winch
You can use dtach to run, detach from, and reattach to other applications, too.
相关文章推荐
- Terminal的快捷键 for Terminal for Mac OS 10.10, Linux/GNU(Ubuntu, deepin, elementory os,CentOS)
- HOWTO build arm-linux toolchain for ARM/XSCALE
- Linux Framebuffer Driver Writing HOWTO for 2.2 kernels
- GNU toolchain for ARM targe HOWTO
- [已解决]在VMware-server for linux 下装centos错误:an error has occurred. - no valid devices were found on which to create new file system
- Knoppix Hacks: Tips and Tools for Using the Linux Live CD to Hack, Repair, and Enjoy Your PC
- how to use usb device in linux version 3.00.14(1)-release (i386-redhat-linux-gnu)
- How to Find a Screen Exit for T-code
- how to install eva QQ (for Linux)
- How to install Nola, the free accounting package for Linux @ JDJ
- GNU/Linux 编程指南之三: autoconf-----configure software to a target platform
- HOWTO build arm-linux toolchain for ARM/XSCALE
- Enhancement--How to Find a Screen Exit for T-code
- Enhancement--How to Find a Screen Exit for T-code
- Steps to enable adding packages from DVD for Oracle Enterprise Linux 5
- Pluggable Authentication Modules: The Definitive Guide to PAM for Linux SysAdmins and C Developers
- How to boot Debian GNU/Linux without entering X GUI
- Enhancement--How to Find a Screen Exit for T-code
- Pluggable Authentication Modules: The Definitive Guide to PAM for Linux SysAdmins and C Developers
- QT for linux 的错误 undefined reference to 'FcFreeTypeQueryFace' 的解决方法