vi, if you issue the command
:sp, the screen splits into two "views", allowing you to edit more than one file from the same terminal.
Along those same lines, is there a way to have multiple shells open in the same terminal?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You can do it in
screen the terminal multiplexer.
Note: After splitting, you need to go into the new region and start a new session via ctrla then c before you can use that area.
EDIT, basic screen usage:
As mentioned in the comments, besides screen, another good terminal multiplexer is tmux. You can refer to the manual for a complete description and command reference. Some basic operations to get started are:
You can achieve more complex layouts by splitting panes. You can also have multiple windows with panes and switch between them.
If you want a program that just splits a terminal¹, there's splitvt. There are programs that split a terminal and do a lot of other stuff besides, such as Screen, Tmux, Emacs, …
Apart from the excellent suggestions on Screen and Tmux if you are using some sort of window manager you may be interested in Terminator you can split horizontally or vertically fashions, plus tabs and more... here's a list of features taken from the author's web site:
Have a look to the screenshots on the project site.
Most important you can combine Terminator with Screen/Tmux.
Konsole for KDE has a built in function:
Ctrl+( to Split View Left/Right
Ctrl+) to Split View Top/Bottom
Shift+Tab will cycle through the split views
Shift+Left Arrow/Right Arrow will cycle the current view through the tabs/views
Ctrl+Shift+X to close the current view
Should be available via your favourite package manager, if you use a mainstream distribution.
It is the only terminal multiplexer where copy-pasting works properly from within panes in your window.
tilix is a
terminator alternative which is almost completely on par with terminator (and where copypasting works properly, too). After evaluating it I still stick with
terminator however due to nicer tab handling and easier configuration (from my POV).
Here I wrote a more complete answer.
Install them (no PPAs needed on Ubuntu/Debian, check for other distros)
sudo apt install guake byobu
Add it to available shells (as I told in this Guake Github issue):
which byobu | sudo tee -a /etc/shells
On Guake preferences (
guake-prefs) choose Byobu as the default interpreter:
This patch provides a vertical split feature for current releases of GNU Screen. The feature is designed to function in the same manner as screen's existing split command, but dividing the regions vertically instead of horizontally. Both forms of splits can be used together in any combination/quantity/order desired. Something similar is slated to appear in GNU Screen 4.1 soon, and is already available in CVS per this mailing list thread (and has been included in the Debian and Ubuntu screen packages starting with 4.0.3-10). Also, a recent project named ScreenWM is designed specifically to work with a vsplit-patched screen (check it out!).