Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose is a bash script that is empty or contains only exit 0. When the script is backgrounded, what is the significance of the 1 and 16320 printed to the console?

b@sam:~/Documents/bashscripts$ ./ &
[1] 16320
[1]+  Done                    ./

Then if user hits ENTER at the command prompt, as illustrated above, another line appears and it shows this

[1]+ Done ./

What is the significance of the 1 digit and the + symbol?

share|improve this question
up vote 2 down vote accepted

[1] is the background job number, used for shell builtin commands like fg and bg which manage multiple tasks running in the same shell. jobs lists the current jobs.

16320 is the process ID number of the task, useful if you want to kill it or similar.

[1]+ Done indicates the background process has exited. Since you requested to run it in the background with ./ &, it didn't wait for it to finish before giving you a fresh prompt (even though it finished almost immediately). The shell therefore notifies you the next time it gives you a prompt.

The + indicates the current (most recent) job, if you have multiple jobs running.

See the bash manual for more information.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.