Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-03-2009, 02:35 PM
|
#1
|
Member
Registered: Jun 2008
Posts: 405
Rep:
|
Is it possible to open a second shell..
I'm running Debian with no desktop and at the moment no network connection (so I can't ssh). A drive recovery program is running in the shell and likely will be for the next 8 to 16 hours by the look of it.
Is there some keyboard shortcut I can use to open a second shell at the terminal while this one continues to run?
Or get a second login prompt... whatever it takes.
|
|
|
12-03-2009, 02:43 PM
|
#2
|
Member
Registered: Jun 2008
Posts: 405
Original Poster
Rep:
|
Nevermind, I found an alternate solution. I can pause the current job using ctrl+z and resume it later (for reference: resume paused by using "jobs" to list stopped jobs and "fg %#" where # is the number of the stopped job I want to resume).
|
|
|
12-03-2009, 02:43 PM
|
#3
|
Senior Member
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Rep:
|
Normally 'ctrl+alt+F2' or F3 or F4 etc. would give a new shell.
|
|
|
12-03-2009, 02:44 PM
|
#4
|
Member
Registered: Sep 2008
Distribution: fedora, gentoo, ubuntu
Posts: 148
Rep:
|
Quote:
Originally Posted by davidstvz
Or get a second login prompt... whatever it takes.
|
You are in luck. There are in fact 6 "virtual terminals" independent of the graphical desktop. You can access them with alt-ctrl F1-6.
Those are there all the time. If you do have a GUI running, you can go back to it with alt-ctrl-F7.
|
|
|
12-03-2009, 02:44 PM
|
#5
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Hello,
There are mainly two ways that I know of, first is pressing CTRL-ALT-F2 or F3 or F4, those are all other logins so you can open a second shell. I believe F5 or F7 is reserved for Graphical Login.
You can also send your program that's running to the background using CTRL-Z and type bg at the prompt. That way you stay in you current shell and the program keeps running in the background.
If you want to recall the program the just type
on the commandline.
Kind regards,
Eric
Last edited by EricTRA; 12-03-2009 at 02:45 PM.
|
|
|
12-04-2009, 08:09 AM
|
#6
|
Member
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 149
Rep:
|
Also: chvt 2 is the same as CTRL-ALT-F2
However, if you are in single user mode, neither of those will work. You can get another login, but it how depends on your distro.
Ubuntu Upstart
Newer Ubuntu systems use "Upstart" instead of inittab. For these systems, a simple"start tty2" will do the job. After typing that, you can hold "Alt" and press F2 to login there and of course Alt-F1 will bring you back to where you started.
Centos inittab
Centos and other systems that still use inittab require a different approach. You'd think you could just do "/sbin/mingetty tty2 &", but that won't work. Nor will "/bin/login tty2 &" or trying to start bash with input and output directed to another tty. What WILL work is sulogin: "/sbin/sulogin tty2 &". Switch to Alt-F2, give the root password and you have another terminal to work in.
It's certainly possible that another distro may require another way or may work with something that didn't work on Centos.
(from http://aplawrence.com/Linux/multiple-consoles.html )
|
|
|
12-04-2009, 04:41 PM
|
#7
|
Senior Member
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,127
Rep: 
|
screen will also give you multiple terminals (even when you run out of the other ones)
|
|
|
12-05-2009, 01:43 AM
|
#8
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
FYI
For those advising <ctrl><alt><Fn>, the <ctrl> is only required while in X; outside X, <alt><Fn> should be sufficient.
|
|
|
All times are GMT -5. The time now is 09:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|