$
Learn Linux handbook
en
XP:0
Quest 2Navigator
+120 XP

Navigating & Listing Files

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

Concept & Overview

Now that you know where you are, how do you look around and move to a different room in this digital library? In Linux, we do this using two simple commands:

- ls: It's like turning on the lights in a room to see all the files and folders sitting inside it.
- cd : Short for "change directory", this lets you walk through a door into another folder.

To specify where you want to go, you can use absolute paths (starting from the very root / of the system, like /var/log) or relative paths (based on where you are right now, like using .. to step back out into the parent folder).

Let's explore. Step into the /var/log folder by running cd /var/log, and then run the ls command to see the log files stored inside.

Command Syntax Reference

Command / SyntaxDescription
lsLists files in the current directory
cd /var/logChange directory to /var/log

Verification Objectives

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

  • ○
    Change directory to /var/log
  • ○
    Run the "ls" command in /var/log

Ready to complete Quest 2?

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