Linux Command Cheat Sheet/List directory contents

List files and directories.

Section: Navigation and Discovery

List directory contents

bash
bash
ls -lah
Explanation

`-l` shows details, `-a` includes dotfiles, and `-h` formats sizes in human-readable units.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Navigation and Discovery
Print working directory
Show the current absolute path.
OpenIn sheetbashsame section
Show directory tree
Display a recursive tree of files and directories.
OpenIn sheetbashsame section
Find files by name
Search recursively for files with a matching name.
OpenIn sheetbashsame section
Find files with locate database
Search a prebuilt file index for paths.
OpenIn sheetbashsame section
Go to home directory
Change to your home directory.
OpenIn sheetbashsame section
Go to previous directory
Jump back to the last directory.
OpenIn sheetbashsame section