From 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?
From 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?
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:
tmux
help resources are: intro, config, primer and cheat-sheet.
– not2qubit
Dec 10 '17 at 10:49
byobu
(which wraps both terminal multiplexers), but Tmux seems to be superior in several aspects other than the configuration. And was already superior several years ago. Screen needed patches for splitting both directions and Tmux had it out of the box. last but not least the license may be an argument for Tmux or Screen, depending on where you stand.
– 0xC0000022L
May 07 '18 at 20:59
screen
is missing from a relatively fresh install of Fedora 30, while tmux
is present.
– Sora.
Jun 18 '19 at 11:15
screen
may be installed almost everywhere out of the box. In fact I have used screen
to run prototypical "services" detached where tmux
wasn't an option. However, in daily usage the readability and usability is a big deal, which is why byobu
as a wrapper -- originally to screen
(it's also in the name: byobu
) -- was invented. And bare bones tmux
wins in the UX department over screen
any day for me ;)
– 0xC0000022L
May 10 '23 at 17:07
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, …
apt install splitvt
does the trick. Is there a way to split vertically?
– ddofborg
Nov 11 '22 at 13:15
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.
ctrl-shift-h/j/k/l
for moving between panes, and ctrl-(shift)-tab for switching between tabs, it just works awesome.
– sjas
Feb 13 '16 at 19:57
same terminal
twice, so Terminator or tilix (as mentioned by @sjas) are not good suggestions. If you are in an ssh session to a remote server with no X server, you will not be able to even run these tools.
– haridsv
May 16 '19 at 11:39
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
Use terminator.
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.
Update: 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.
I'm a happy user of Guake with Byobu inside it, which by default uses tmux
(probably better than screen
) as backend.
Install them (no PPAs needed on Ubuntu/Debian, check for other distros)
sudo apt install guake byobu
Add it to available shells (as told in this Guake Github issue):
which byobu | sudo tee -a /etc/shells
On Guake preferences (guake-prefs
) choose Byobu as the default interpreter:
Guake
Byobu
apropos byobu
Vim
can also be used as a rough terminal multiplexer:
:terminal
opens a horizontial split terminal,
:vertical terminal
opens a vertical split terminal.
As always the commands can be assigned to keyboard shortcuts.
Try Vertical Split for GNU Screen
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!).
Ctrl+|
splits the screen
in Ubuntu right off the bat.
– Jonatan Öström
Oct 23 '16 at 18:17
ctrl+a
then release everything thenshift+s
(don't know for caps lock, mine is disabled) – shellholic Dec 05 '11 at 12:43Ctrl A Shift S
splits the screen, thenCtrl A Tab
switches to the other split, andCtrl A c
creates a bash prompt. Is there anyway to have these commands run automatically when startingscreen
so we don't have to run the commands all the time. – Michael Butler Sep 19 '12 at 14:22ls -al
? – Peter Feb 14 '17 at 07:54expect
, but how to do Control and sequences? – Ondra Žižka Mar 02 '18 at 15:05ctrl a
and thenEsc
and then use arrow keys to scroll up to see info off the top. HitEsc
again to exit that scroll mode. – Michael Anderson Dec 15 '23 at 20:08