Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-08-2003, 06:02 PM   #1
Registered: Sep 2003
Posts: 103

Rep: Reputation: 15
running jobs in background in bash


I want to run jobs inthe background in bash. So I set my job going and do a ctrl^z to suspend. Accoridng to the manual if I do bg%<JOBID> the job will continue in the background. By using 'set -b' I see that straight after doing bg %<JOBID> the job is stopped by something. I am using bash 2.05. How can I make jobs run in the background?


Old 10-08-2003, 07:05 PM   #2
Senior Member
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
program &
That will cause program to execute in the background.
Old 10-08-2003, 07:11 PM   #3
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
To further this after you put a program using &, as /bin/bash stated, you can view the programs running in the background by using the 'jobs' command. Then if you want to bring a program back to the foreground you can do:

fg %n

replacing n with the job number given by the 'jobs' command.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
running jobs on the background feetyouwell Linux - Software 5 09-07-2019 03:13 PM
Nohup and Background Jobs Onyx2316 Linux - Newbie 3 02-28-2012 12:10 AM
Kill all Background Jobs jwprz70 Linux - Newbie 10 05-12-2010 01:29 AM
Background jobs paddyjoy Linux - Newbie 2 07-19-2005 01:46 AM
background jobs seize630 Linux - General 6 10-14-2003 03:16 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration