What Is Head and Tail in Linux?
Contents

The head command command prints lines from the beginning of a file (the head), and the tail command prints lines from the end of files.

What is head and tail command in Linux?

Introduction to the head and the tail Commands

They are, by default, installed in all Linux distributions. As their names imply, the head command will output the first part of the file, while the tail command will print the last part of the file. Both commands write the result to standard output.

What does head mean in Linux?

The head command, as the name implies, print the top N number of data of the given input. By default, it prints the first 10 lines of the specified files.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest