Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Switch Between Shell and Applications on Terminal

Several times we face the issue of switching from a running Application to the Shell without quitting it and then resuming the work on the application once we are done with shell. This is the case when the application is running in the terminal. For eg. we executed a Python script and it resulted in some error, then we open the Python file in the same terminal using VIM. Now, we want to review the error but without closing the VIM (as you have not committed the changes yet, and aren’t sure if you are ready to do that). Another similar situation: Suppose we are running the Python shell and have done few things here. Now, we want to switch to BASH (to run a shell command) without closing the Python shell and resume our work on Python shell once we are done with BASH. These are just few of the many cases where we need to alternate between our current application on terminal and the Linux shell.

The solution to this problem is very straight and simple. While you are working on the application, just press “Ctrl Z” which would suspend the process but won’t kill. You would get a message saying “suspended” at the shell prompt. Now, do what you want to do on shell and once you are done, just type “fg” and you would get back to your previously suspended application. “fg” stands for foreground, which literally brings the suspended process to foreground.

Share and Enjoy

• Facebook • Twitter • Delicious • LinkedIn • StumbleUpon • Add to favorites • Email • RSS

The post Switch Between Shell and Applications on Terminal appeared first on Harsh Tech Talk.



This post first appeared on Harsh Tech Talk, please read the originial post: here

Share the post

Switch Between Shell and Applications on Terminal

×

Subscribe to Harsh Tech Talk

Get updates delivered right to your inbox!

Thank you for your subscription

×