Similar to the tail command which shows you the last few lines of a text file, the head command lets you to quickly view the first few lines.
The head command syntax.
head [options] file
By default head will show you the first 10 lines of a text file.
$ head textfile.txt
You can change the number of lines displayed by adding ‘-n‘ option and adding the number of lines.
$ head -n 3 textfile.txt
This will show the first 3 lines in the file.