How to Keep Folders Grouped at the Top Above Files in Ubuntu Files

Opening a busy Downloads or project directory on Ubuntu when folders are scattered mid-alphabet between dozens of random documents and photos makes finding subfolders slow—for example, forcing your Invoices folder halfway down beneath Holiday-Ticket.pdf instead of sitting neatly together at the top of the list.

Whether your folders got mixed alphabetically by mistake or you want to switch between grouped folders and flat alphabetical lists on Ubuntu, the built-in Files manager keeps a single switch right inside Preferences—no Terminal tweaks required.

Pin All Folders Above Files in Ubuntu Settings

Once enabled in Ubuntu’s default GNOME Files app, every folder across your computer automatically groups together cleanly at the top—whether you sort by Name, Size, or Date Modified.

  1. Open the Files app on your Ubuntu desktop.
  2. Click the three-horizontal-lines menu button near the top-right (or top-left) of the toolbar and click Preferences.
  3. Look right at the very top under the General heading for the toggle labelled Sort Folders Before Files.
  4. Switch Sort Folders Before Files to on (coloured switch).

Close the Preferences pop-up window and glance straight back at your folder view—all subfolders jump immediately to the top of the list in neat alphabetical order above your loose files.

Prefer Mixing Folders Alphabetically Inside Specific Folders?

Occasionally—such as browsing a massive A-to-Z music collection organised partly in loose tracks and partly in album folders—some users actually prefer switching Sort Folders Before Files off so every item follows strict A–Z ordering together. Reopening that exact same Files → Preferences toggle flips it smoothly either way in two seconds.

Pair With Clean Reverse-Date Sorting Inside Downloads

Notice one massive everyday workflow boost inside your Downloads folder once Sort Folders Before Files is switched on: switch Downloads to List View (tap Ctrl + 1) and click the Modified column header until the downward arrow shows newest items first. Now every subfolder stays neatly parked cleanly at the very top while your newest downloaded PDFs appear right underneath them at row one—never buried fifty rows down.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.