Beginner Package: coreutils

ls

List directory contents.

Syntax

ls [options] [path]

Description

ls is the most frequently typed command on any Linux system, listing files and directories with an enormous range of options for sorting, formatting and filtering the output.

Examples

ls -la
Long listing, including hidden files, with permissions and sizes
ls -lh
Long listing with human-readable file sizes (K, M, G)
ls -lt
Sort by modification time, newest first

Applies to

Ubuntu Debian Linux Mint RHEL CentOS / Rocky / AlmaLinux Fedora Arch Linux openSUSE Alpine Linux