Can I execute a command in the foreground, by typing on the terminal the command?
e.g. command &
Can I execute a command in the foreground, by typing on the terminal the command?
e.g. command &
If you drop the &
the command will run in the foreground:
command
If you want to bring a background command to the foreground, run
fg
You can specify a “jobspec”, for example
fg %2
will bring job number 2 to the foreground (jobs
will list the job table).
The command with & brings it in background. if you type a command without &, you can bring it in background with:
CTRL+Z
bg
If you want to go back to foreground, type
fg