Linux - NewbieThis 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.
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.
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.
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).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.