FG
💻 Software

How to list folders using bash commands?

Fresh7 days ago
Mar 15, 2026140972 views
Confidence Score1%
1%

Problem

Is there any way to list just the folders in a directory using bash commands? ( as the command lists all the files and folders )

Error Output

ls

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to list folders using bash commands?

Low Risk

You can use: Since all directories end in , this lists only the directories in the current path. The -d option ensures that only the directory names are printed, not their contents.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment