17

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

0

2 Answers 2

24
nautilus -q 

or

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.

2
  • killall nautilus didn't work for me (over ssh). Commented Nov 19, 2020 at 3:40
  • nautilus --quit Commented May 26, 2023 at 7:42
5
pkill nautilus 

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

pkill -9 -f nautilus 
3
  • do not kill -9 Commented Jun 9, 2013 at 13:42
  • 2
    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. Commented Jun 9, 2013 at 15:40
  • 1
    Yeah, not using kill -9 is impractical. In a perfect world, we don't even need to use pkill at all. Commented Nov 19, 2020 at 3:41

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.