I use Mint 20.2 with Mate File Manager.

I am new to Linux, and I am a long time user of MacOS.

I am looking for a way to close all the open windows of the File Manager with one command, possibly just using a keyboard shortcut (as I am used to do in MacOS).

I am aware I may need to create a script and associate it to a keyboard shortcut, in that case could you help me with that. I am open to any solution that allow me to use just one shortcut, without leaving the File Manager.

  • 1
    You could create a shortcut with killall caja :D
    – Mickey
    Jan 7, 2022 at 8:58
  • that would be great! is there a way to associate the script to an element in the panel? and/or to a keyboard shortcut?
    – Fabio
    Jan 10, 2022 at 16:15
  • killall caja works but is a bit dirty but you can use caja -q. I posted an answer.
    – Mickey
    Jan 11, 2022 at 17:49

1 Answer 1


Actually you can use the caja -q command You can create a keyboard shortcut like this:

  1. Open shortcuts window: System->Preferences->Hardware->Keyboard Shortcuts
  2. Create new shortcut: Click the Add button. Set the name you like e.g. Close all caja windows and set the Command to caja -q. Then click Apply
  3. Set the screenshot you want: Double click where it says Disabled and press your preferred Key combo, e.g. "Ctrl+Shif+q"

or a panel applet like this:

  1. add panel item: right click on the panel, select the Add button and add a "Custom Application Launcher".
  2. Create new launcher: Set the name you like e.g. Close all caja windows and set the Command to caja -q (Type: App or App in Terminal, Comment: how you like it, Picture: how you like it. Then click Ok

Hope this helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .