Prev | Current Page 204 | Next

Christopher Negus

"Linux Bible, 2008 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 11 Other Distributions"

bashrc file??”if you added it there??”or it
will return the next time you open a shell.)
Managing Background and Foreground Processes
If you are using Linux over a network or from a dumb terminal (a monitor that allows only text
input with no GUI support), your shell may be all that you have. You may be used to a graphical
environment where you have a lot of programs active at the same time so that you can switch
among them as needed. This shell thing can seem pretty limited.
Although the bash shell doesn??™t include a GUI for running many programs, it does let you move
active programs between the background and foreground. In this way, you can have a lot of stuff
running, while selectively choosing the program you want to deal with at the moment.
There are several ways to place an active program in the background. One mentioned earlier is to
add an ampersand (&) to the end of a command line. Another way is to use the at command to
run commands in a way in which they are not connected to the shell.
To stop a running command and put it in the background, press Ctrl+Z. After the command is
stopped, you can either bring it back into the foreground to run (the fg command) or start it running
in the background (the bg command). Keep in mind that any command running in the
63
Running Commands from the Shell 2
background might spew output during commands that you run subsequently from that shell.


Pages:
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216