← All commands
Topic hub File Management
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
Debian/Ubuntu same command
ls -1
Fedora same command
ls -1
Arch same command
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 optionUse
ls -1List one name per line
ls -1AInclude hidden names
ls -1 *.txtList 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.

DistributionPackage manager / baseEquivalent commandDifference 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

Related File Management commands