Display the first lines of a file.
Section: Viewing and Text Basics
Show first lines
bash
bash
head -n 20 app.logExplanation
Useful for previewing large files quickly.
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 Viewing and Text Basics