nerdexam
Linux_Foundation

LFCA · Question #32

How do you display the first 10 lines of a file in Linux?

The correct answer is D. head. The head command in Linux is used to display the first 10 lines of a file by default.

Submitted by paula_co· May 4, 2026Linux Fundamentals

Question

How do you display the first 10 lines of a file in Linux?

Options

  • Atail
  • Bless
  • Ccat
  • Dhead

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    3% (1)
  • D
    90% (27)

Why each option

The `head` command in Linux is used to display the first 10 lines of a file by default.

Atail

The `tail` command displays the last 10 lines of a file by default.

Bless

The `less` command is a pager that allows viewing file content interactively, but does not specifically display only the first 10 lines by default.

Ccat

The `cat` command concatenates files and prints their entire content to standard output.

DheadCorrect

The `head` command displays the first few lines of a file or files to standard output, with the default number of lines being 10. You can specify a different number using the `-n` option.

Concept tested: Linux file viewing commands (head)

Source: https://man7.org/linux/man-pages/man1/head.1.html

Topics

#head command#file viewing#CLI utilities

Community Discussion

No community discussion yet for this question.

Full LFCA Practice