Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 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.

share|improve this question
up vote 5 down vote accepted

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


share|improve this answer
It says installing Nemo will install Cinnamon too ( I wouldn't like to change anything now, if there is a solution without changes :) – bosniamaj Feb 8 '13 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 – Édouard Lopez Feb 8 '13 at 15:31
got similar settings on a nautilus 3.4.2. Did you close your nautilus and open it back ? – Édouard Lopez Feb 8 '13 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 Feb 8 '13 at 16:20
Thanks a lot! This has been bugging me for a long time.. Why isn't this the default?! – tsauerwein Aug 9 '14 at 12:03

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.

share|improve this answer
Set by "modification time" using gsettings set org.gnome.nautilus.preferences default-sort-order mtime – Dave May 21 '13 at 23:09
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. – Felix Schwarz May 5 '14 at 8:29

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

share|improve this answer

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

share|improve this answer

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
share|improve this answer

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.