Practice Use drills for recall and labs for real operating judgment.

LAB-FS-04 - Inside /proc and /sys - The Virtual Windows

Read basic live system information from /proc and /sys so you understand that Linux exposes many hardware and kernel details as files.

FS File System Mastery

Inside /proc and /sys - The Virtual Windows

Read basic live system information from /proc and /sys so you understand that Linux exposes many hardware and kernel details as files.

40 min INTERMEDIATE LINUX Curriculum-reviewed
Success criteria
  • Read a few useful files under /proc and /sys.
  • Explain why these files can show live system state without being normal disk files.
Safety notes
  • This lab is read-only. Do not write to files in /proc or /sys.

Part A: The Field Guide

Linux exposes a lot of live system state through files that are generated on demand.

That means you can often inspect CPU, memory, uptime, or device details with the same reading skills you already learned.

Important Boundary

You can read many files under /proc and /sys safely. Writing to them is a different topic and can change system behavior. Do not do that in this lab.

Useful starter paths

  • /proc/cpuinfo for processor details
  • /proc/meminfo for memory statistics
  • /proc/uptime for uptime data
  • /sys/class/net for network interface information

Part B: The Drill Deck

Terminal required: keep this lab observational.

G
Guided Step by step - type exactly this and compare the result
>

Exercise G1: Read CPU information

  1. Run grep "model name" /proc/cpuinfo
  2. Notice that the information appears as text even though it is live system data

Exercise G2: Read memory information

  1. Run head -n 10 /proc/meminfo
  2. Find MemTotal and MemAvailable
  3. Compare that with the output of free -h if available

Exercise G3: Read uptime directly

  1. Run cat /proc/uptime
  2. Notice that the first number is the uptime in seconds
  3. Explain why a normal text file on disk would not update like this on every read
S
Solo Task described, hints available - figure it out
>

Exercise S1: Inspect network interface details

  1. Run ls /sys/class/net
  2. Choose one interface such as lo, eth0, or wlan0
  3. Read its state with cat /sys/class/net/<name>/operstate
  4. Read its address with cat /sys/class/net/<name>/address

Exercise S2: Connect the command to the source

  1. Run uptime
  2. Run cat /proc/uptime
  3. Run free -h
  4. Run head -n 5 /proc/meminfo

The point is not that the outputs are identical. The point is that many commands are presenting data that ultimately comes from these pseudo-filesystems.

M
Mission Real scenario - no hints, combine multiple skills
>

Mission M1: Explain the difference

In your own words, explain:

  1. why /proc and /sys feel like files but are not ordinary stored documents
  2. why they are useful when graphical tools are unavailable
  3. why reading is safe but writing should wait until you understand the consequences

If you can explain that clearly, the mental model is doing its job.