Linux Commands Helper

💬 Your AI-powered Linux assistant

head Command - Output the First Part of Files

The head command outputs the first part of files. By default, it prints the first 10 lines of each file to standard output.

Syntax

head [options] [file...]

Examples

head /var/log/syslog

Show the first 10 lines of the syslog file.

head -n 20 file.txt

Show the first 20 lines of file.txt.

Notes

  • Use -n to specify the number of lines to display.
  • Use tail to display the last part of files.

© 2025 Linux Commands Helper. All rights reserved.

This project is under construction. Feedback and contributions are welcome.

Fazier badgeFeatured on Startup Fame