>_
linuxcommand.dev
Home
Roadmap
Contact
EN
Dark
>_
>_
linuxcommand.dev
Home
Roadmap
Contact
Legal Notice
Privacy Policy
Language
DE
EN
Design
Dark
Startseite
›
head
Text Processing
head
Print the first lines of files.
Ubuntu
CentOS
Debian
Arch
SUSE
Slackware
Alpine
Fedora
Last updated:
2026-07-05
Report error
Syntax
Copy
$
head [OPTIONS] [FILE...]
Examples
Examples
$
head file.txt
Examples
$
head -n 20 file.txt
Typical use cases
Standard usage
head --help
Detailed Help
man head
Note
Use -n to set the line count.
Export
Text
JSON
Script