Windows
Linux
File Management
File System
Windows dir /b equivalent in Linux
Prints one file or directory name per line without detailed metadata.
Windows
→
dir /b
Linux equivalents
ls -1
ls -1
ls -1
Overview
What this command does
Prints one file or directory name per line without detailed metadata.
Migration tip: The number
1 option forces one entry per line. Use -A as well when you want hidden files but not . and ...Practical tasks
Common use cases
List names only
Prints one file or directory name per line without detailed metadata.
ls -1
List one name per line
ls -1A
Include hidden names
ls -1 *.txt
List matching files only
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
ls -1
ls -1A
ls -1 *.txt
Walkthrough
Examples with explanations
ls -1 # show names only
ls -1A # include hidden files
ls -1 *.txt # show only text files
Reference
Common options and variations
| Command or option | Use |
|---|---|
ls -1 | List one name per line |
ls -1A | Include hidden names |
ls -1 *.txt | List matching files only |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | ls -1 |
Same command on this distribution. |
| Fedora | same command | ls -1 |
Same command on this distribution. |
| Arch | same command | ls -1 |
Same command on this distribution. |
Keep learning