How to change the sort by for folders to type, because I want folders to be shown first and then files by name. When I sort by type, I get the result I want, but I need to change this for all my folders.

How can I change the default preference to sort by: type, so every folder will by default be sorted by type? I tried with dconf-editor, then org > gnome > nautilus > preferences and tried to choose type in default-sort-order, but I can only select modification_date, not by type.

5 Answers 5


On Nemo (a recent fork of nautilus), I have the following in the menu :

  1. Edit > Preferences
  2. then on the Views tab
    • I got a section called Default View
    • with a line Arrange items, there is a select where I can choose the default sort order



  • It says installing Nemo will install Cinnamon too (webupd8.org/2012/12/how-to-install-nemo-file-manager-in.html). I wouldn't like to change anything now, if there is a solution without changes :)
    – bosniamaj
    Commented Feb 8, 2013 at 15:29
  • I never meant you to install Nemo, just show you the option exist in recent version. Which ubuntu and nautilus version do you use ? Add it to the question/description Commented Feb 8, 2013 at 15:31
  • 1
    got similar settings on a nautilus 3.4.2. Did you close your nautilus and open it back ? Commented Feb 8, 2013 at 15:39
  • Yes, I am a noob to the Ubuntu, sorry. I found the preference > default view. I didn't see it in the top bar, instead I was trying dconf-editor :(
    – bosniamaj
    Commented Feb 8, 2013 at 16:20
  • Thanks a lot! This has been bugging me for a long time.. Why isn't this the default?!
    – tsauerwein
    Commented Aug 9, 2014 at 12:03

Determine the current default value of Nautilus sort order using gsettings

gsettings get org.gnome.nautilus.preferences default-sort-order

Then change/set it to 'type'

gsettings set org.gnome.nautilus.preferences default-sort-order 'type'

The change happens instantly

  • Change type to mtime to sort by Last Modified. You can also set default-sort-in-reverse-order to true to sort in reverse order.
    – passerby51
    Commented Nov 24, 2021 at 21:22

update February 2017:

nautilus now has a configuration option to sort directories first (I think since 3.14 or so) so I recommend using that instead of changing the default sort order. It is literally the first item in GUI preferences.

initial post from May 2014

I see the same problems on Fedora 18 (using the same versions).

The first attempt using dconf directly via the command line does not work for me:

$ dconf write /org/gnome/nautilus/preferences/default-sort-order type
error: 0-4:unknown keyword

Now gsettings to the rescue:

$ gsettings set org.gnome.nautilus.preferences default-sort-order type

I'm not sure why dconf does not accept 'type' as a valid value even though dconf-editor explicitely lists it in the help text but gsettings works for me just fine.

  • 4
    Set by "modification time" using gsettings set org.gnome.nautilus.preferences default-sort-order mtime
    – Dave
    Commented May 21, 2013 at 23:09
  • 1
    user274121 added this explanation: "the quotes need to be passed to dconf" so dconf write /org/gnome/nautilus/preferences/default-sort-order \'type\' would be the correct call. Commented May 5, 2014 at 8:29
  • 2021 - None of the answers seem to work. Commented Oct 6, 2021 at 19:14

Change the reverse sort order settings for files(nautilus)/nemo on Ubuntu 14.04:

gsettings list-recursively | grep reverse


gsettings set org.nemo.preferences default-sort-in-reverse-order true    
gsettings set org.gnome.nautilus.preferences default-sort-in-reverse-order true

In preferences -> Views -> Arrange Items

It has got 'By Type' in the drop down list.

If you can't see preferences in gnome-shell, click on the nautilus icon in the top panel

enter image description here

You must log in to answer this question.

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