Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers 3

up vote 6 down vote accepted

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.

share|improve this answer
    
+1 Screen is one of the more useful programs in existence. –  David Oneill Jan 18 '11 at 0:51
add comment

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.

share|improve this answer
    
bash has suspend, too. –  Benjamin Bannier Jan 18 '11 at 1:04
    
@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 –  Mikel Jan 18 '11 at 3:32
add comment

By default there are multiple virtual consoles you can change between in Linux, usually by pressing Alt + one of the function keys, usually F1 through F7. The number of consoles available depends on how the NR_CONSOLES directive was set when your kernel was compiled, it may vary depending on distribution.

If you'd like to fork another shell, simply run the binary, e.g.: /bin/bash (simply bash will work fine since it's usually in your path). Keep in mind this does not make the old shell available unless you send it to the background or have it run in a screen session.

If you are using a desktop environment and running terminal windows, you can usually map keys to launch more terminal windows from the environment. I know GNOME and KDE have this ability. You can switch between graphical windows with ALT+TAB.

If you tell us your use case scenario we can probably find a more suitable solution.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.