Folders before alphabetical order

Do you guys know how to place a folder before the alphabetical order [of the other folders]? On Windows, we can just put an underscore before the name of the folder, and it goes to the beginning of the list.
I have tried all symbols on Linux but nothing works. I wouldn’t like to use “aaa” to place the folders at the beginning, or “zzz” to place them at the end. Thanks!
[edit: I’m using Gnome and Nautilus]

Is this what you are looking for?

With Dolphin in KDE Plasma you have this option:

In GNOME you open Files and go to preferences and set it like this


At least in my KDE underscore goes before a:

No settings modified as far as I remember.


Do you have a specific desktop or application in mind? @bogdancovaciu showed the options available in KDE’s and GNOME’s file manager. I just checked and XFCE’s file manager, Thunar, also has the “Sort folders before files option”.


  • Check Settings (Sort folders before files)
  • Right-click and check context menu (Sort By)
  • Click a column heading (Type)

In addition, from the command line, the ls command has an option “–group-directories-first”.
I have an alias in my .bashrc that includes this option:
alias l='ls -l --size --group-directories-first'


The GTK file-chooser dialog needs a change in dconf.

➜  ~ dconf dump /org/gtk/settings/file-chooser/
window-position=(2320, 116)
window-size=(1096, 822)

Set the value

dconf write /org/gtk/settings/file-chooser/sort-directories-first true

thanks! but I have that option ticked. I need to put a folder before the other folders, “bypassing” the alphabetical order

yeah, I used Dolphin but I don’t remember how it was. now I’m using Nautilus (I forgot to mention that)

thanks! that works, but I was thinking about a folder before other folders. when I have a lot of folders, sometimes I want to see one of them at the top

Add it as favorite then … :slight_smile:

1 Like

Give the folder in question a number before the text?
Numbers are sorted before alphabethic afaik

1 Like


I believe this is a language collation issue. I have experienced a similar thing on the command line, and I resolved it by setting LANG and LC_ALL in my environment. I have been trying to do the same thing for a Gnome session, but am not having any success. I saw an article that suggested the use of a ~/.dmrc file with the contents


would work for Gnome, but it did not. I noticed that after doing that, the environment variables GDM_SESSION and GDM_LANG were set, so I also set GDM_LC_ALL, but it had no effect.

I think that if you can determine how to set those values for your GUI session, you will probably get the results you are looking for. :man_shrugging:

1 Like

hm. I tried symbols but not numbers… smh
maybe it gets confusing, but in this particular case it might work. thanks!

interesting, I’m gonna check that. thanks!