-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux ls Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to ls on Linux, covering Arch Linux, CachyOS, and other distributions including listing files, directory contents, and file information.
ls lists directory contents.
Uses:
- List files: Show files in directory
- Directory contents: View directory
- File information: See file details
- Navigation: Explore filesystem
Why it matters:
- Essential command: Most used command
- File management: Navigate files
- System exploration: Explore system
Basic usage:
# List files
ls
# List specific directory
ls /path/to/directory
# List current directory
ls .Detailed listing:
# Long format
ls -l
# Shows:
# - Permissions
# - Owner
# - Group
# - Size
# - Date
# - NameUseful options:
# All files (including hidden)
ls -a
# Human readable sizes
ls -h
# Recursive
ls -R
# Sort by time
ls -t
# Reverse order
ls -rMultiple flags:
# Long format, all files, human readable
ls -lah
# Recursive, long format
ls -lRIdentify types:
# Show file types
ls -F
# Indicators:
# / = directory
# * = executable
# @ = symlink
# | = FIFOColored output:
# Color output
ls --color
# Or
ls --color=autoCheck installation:
# Check ls
which ls
# Usually in coreutils
# Install if missing
sudo pacman -S coreutilsThis guide covered ls usage, file listing, and directory navigation for Arch Linux, CachyOS, and other distributions.
- File Managers - GUI file managers
- find Guide - Finding files
-
ls Documentation:
man ls
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.