LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Returning to a stopped shell. (https://www.linuxquestions.org/questions/linux-newbie-8/returning-to-a-stopped-shell-613546/)

swamprat 01-14-2008 03:13 PM

Returning to a stopped shell.
 
I had to switch to a new shell using the cntl_Z command and this worked. I was editing the item below. Now I'm finished with the current shell and would like to return to the previous shell but I don't know how...

Can anyone shed some light on this ... thanks.


[root@centos5 ~]# jobs
[1]+ Stopped vi /etc/postfix/main.cf

swamprat 01-14-2008 03:34 PM

What I'm saying here is that I use cntl-z to open up a new shell so how do I get back to the first one?

jakefolger 01-14-2008 03:40 PM

I could be wrong but I believe the command is fg

I'm pretty sure ctrl-z moves the current process to the background. Using fg will move it back to the foreground. Let me know if that works for you.

lopoetve 01-14-2008 04:17 PM

Quote:

Originally Posted by jakefolger (Post 3022360)
I could be wrong but I believe the command is fg

I'm pretty sure ctrl-z moves the current process to the background. Using fg will move it back to the foreground. Let me know if that works for you.

this should be it.

as an addition, google up screen, as it offers better options for this.

swamprat 01-14-2008 04:38 PM

Thanks All,

Yes 'fg' did it.


All times are GMT -5. The time now is 06:07 AM.