Nautilus show folders before files does not work in Ubuntu 18.04 LTS
You can change this from the Nautilus preferences. Open the context Menu from the top-right of a Nautilus Window:
Tick 'Sort folders before files'.
If that doesn't work you can edit the Dconf file directly, the easiest way is using the Dconf Editor:
Install Dconf Editor (sudo apt install dconf-editor
), open it and then navigate to:
org → gtk → settings → file-chooser → sort-directories-first and set it to True.
Alternatively, run this command in the terminal:
dconf write /org/gtk/settings/file-chooser/sort-directories-first true
It is also possible to use the pre-installed gsettings
command line utility for that:
gsettings set org.gtk.Settings.FileChooser sort-directories-first true
The current setting can be checked like this:
gsettings get org.gtk.Settings.FileChooser sort-directories-first