How to change default "sort by" to "type" in nautilus

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.


Solution 1:

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

Screenshot

http://imgur.com/OO2lMIz

Solution 2:

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

Solution 3:

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.

Solution 4:

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