$
Learn Linux handbook
en
XP:0
Quest 62File-Tracker
+200 XP

Listing Open Files (lsof)

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

Concept & Overview

In Unix-like systems, "everything is a file." This means not only text files and folders, but also network sockets, system hardware, and processes are treated as files. To find out which files are being accessed by which running programs, we use lsof (List Open Files).

- Running lsof displays a comprehensive list of all open files, along with the Process ID (PID) and command that opened them.
- E.g., running lsof -i lists all network files/sockets, which is extremely useful for discovering which process is listening on a specific network port (like port 80).

Let's inspect our active connections and files. Run lsof to see all open files in the system.

Command Syntax Reference

Command / SyntaxDescription
lsofList all open files on the system

Verification Objectives

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

  • ○
    Run the "lsof" command

Ready to complete Quest 62?

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