I found a little gem that I am using if I have to do serveral things at the same time on the same server.
Like testing my scripts and looking at the logs and at the mongodb client at the same time.
The tool is tmux which is a terminal multiplexer.
It allows you to split a terminal into smaller peaces and to navigate between the peaces and whole panes.
Installation is simple:
apt-get install tmux
You can start the tool with “tmux”.
After that you can split your screen with following commands
You can navigate between the different panes with:
You can add a new page too:
And switch between them with:
You can change the title of one screen too by:
Like screen you can detach and attach to running sessions:
tmux attach -t [session name]
Best of all is the configuration of tmux itself:
# Start numbering of windows at 1 set -g base-index 1 # Set up a status bar set -g status-bg black set -g status-fg white set -g status-left "#[fg=green]" set -g status-right "#[fg=green]#H" #Or a shell command #set -g status-right "#[fg=yellow]#(uptime)" # Highlight active window set-window-option -g window-status-current-bg red # Set clipboard and history limit set-option -g set-clipboard on set -g history-limit 1000 # Set modifier from Ctrl+b to Ctrl+a, just like screen (fisle) set-option -g prefix C-a # mouse support (dabtech) set -g mode-mouse on set -g mouse-resize-pane on set -g mouse-select-pane on set -g mouse-select-window on