How to sort files order by "type" for all directories?

Solution 1:

You could change Nautilus preferences: Nautilus menu > Preferences > View (tab) and set Arrange items: By Type.

enter image description here


Or you can use dconf-editor. First install it:

sudo apt install dconf-editor

Then launch the application dconf-editor and go to org > gnome > nautilus > preferences and change the Default sort order.

enter image description here


Another way is to use gsettings to set this value:

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

References:

  • How can I script the settings made by gnome-tweak-tool?