is it possible to open a new shell from a shell and switch between them?
Solution 1
Run screen
(1). It is a terminal multiplexer. This lets you create multiple shells, running under screen, which you can switch between. You can "detach" from screen to get back to the original shell, and "re-attach" to get back access to those shells.
There's also tmux
(1), doing much the same thing. And on some Unices, window
(1) or splitvt
(1). But screen
(1) is the most wide-spread and probably the tool for which you'll most readily find help.
Solution 2
You can do this in zsh by running suspend
to switch from the second shell to the first, andfg
to switch from the first to the second.
You should be able to do something similar in bash using kill -STOP $$
in place of suspend
.
But GNU screen or tmux would be easier.
Related videos on Youtube
DCIndieDev
Updated on September 17, 2022Comments
-
DCIndieDev over 1 year
hey all I am wondering if I can open a shell or new terminal thing from within the terminal in a unix/linux enviroment. Particularly a commandline only one where there is no GUI. Is this doable? how do I do it?
-
David Oneill over 13 years+1 Screen is one of the more useful programs in existence.
-
Benjamin Bannier over 13 years
bash
hassuspend
, too. -
Nethan over 13 years@honk Thanks. Online man pages didn't mention
suspend
, but indeed it's there in bash 3.2. gnu.org/software/bash/manual/html_node/Bash-Builtins.html