Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I don't understand why exit & does not work. Why does it not?

share|improve this question
dummy question. I'd vote for closing it. – poige Aug 15 '13 at 14:03
But people may not find the truth on demand then :( – Pedro Ziff Aug 15 '13 at 14:05
Dummy truth isn't worth finding, don't worry ;) – poige Aug 15 '13 at 14:06
But I am happy I found it, life fulfilled suddenly. :) – Pedro Ziff Aug 15 '13 at 14:07
Same reason cd / & "doesn't work" – kojiro Aug 16 '13 at 11:20
up vote 19 down vote accepted

I think it works. But probably it doesn't do what you expect.

 $ exit &

Will create a sub-shell process, and make it run as a background job which will just finish right away.

share|improve this answer
In other words, this is the "fake your own death" operator. – Kaz Aug 15 '13 at 19:54

It does work. & forks the shell, starting a new process (you could think of it as & exit, except of course that syntax actually means something else). exit is a shell built-in that ends the shell process -- in this case the new backgrounded shell.

> exit &
[1] 1709
> ps -p 1709
  PID TTY          TIME CMD
[1]+  Done                    exit

There's your job. It's done. It worked.

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.