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

How can I close all opened Nautilus (explorer) windows from the terminal?

share|improve this question
up vote 6 down vote accepted
nautilus -q


killall nautilus

If nautilus is in the middle of doing something you should use the first command as it allows nautilus to exit gracefully. The second command just "terminates" nautilus so if invoked in the middle of e.g. a copy/move operation you might end up with corrupted data.

share|improve this answer
pkill nautilus

Or to kill everything with nautilus in the name, while insisting:

pkill -9 -f nautilus
share|improve this answer
do not kill -9 – lesmana Jun 9 '13 at 13:42
The side-effects of kill -9 are no big deal. I agree that the executable should have had a chance to shut down cleanly first, but "do not kill -9" gives associations to parents that want their child to wear a helmet at all times. – Alexander Jun 9 '13 at 15:40

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.