Discover more from Daily Dose of Data Science
Most Command-line Users Don't Know This Cool Trick About Using Terminals
Watch a video version of this post for better understanding: Video Link.
After running a command (or script, etc.), most command-line users open a new terminal to run other commands. But that is never required.
When we run a program from the command line, by default, it runs in the foreground. This means you can't use the terminal until the program has been completed.
However, if you add '&' at the end of the command, the program will run in the background and instantly free the terminal.
This way, you can use the same terminal to run another command.
To bring the program back to the foreground, use the 'fg' command.
Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new about Python and Data Science every day.
Find the code for my tips here: GitHub.