$
Learn Linux handbook
en
XP:0
Quest 13Reader
+150 XP

Reading File Contents

Launch Interactive Terminal for This Quest→No installation required • Runs fully in browser

Concept & Overview

Think of opening a folder, pulling out a page of text, and holding it up to read. In Linux, we read files instantly without opening a heavy text editor using the cat (concatenate) command.

- The cat command prints the entire contents of a file directly onto your terminal screen. For instance, running cat notes.txt lets you see what is written inside notes.txt right away.

Let's read a system file. Print the contents of the local network configuration file at /etc/hosts by running cat /etc/hosts.

Command Syntax Reference

Command / SyntaxDescription
cat /etc/hostsPrint hosts file content

Verification Objectives

These conditions will be automatically verified when you run commands inside the interactive terminal simulator:

  • ○
    Run the "cat" command on /etc/hosts

Ready to complete Quest 13?

Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.