Hands-On LabBeginner

Computer Hardware Essentials - CPU, Memory, and Virtualization

Count processors, measure memory, and identify whose hardware this is with nproc, free, and systemd-detect-virt.

35 minEstimated time
3Guided steps
AutoVerification
IsolatedSandbox
Computer Hardware Essentials - CPU, Memory, and Virtualization

Lab overview

Linux exposes hardware as files and small commands. An administrator who cannot count processors or read a memory total cannot size a host, escalate a ticket, or tell a virtual machine from a container. nproc, lscpu, and /proc/cpuinfo are three views of the same kernel data. free is a formatted view of /proc/meminfo. systemd-detect-virt --vm asks whether this kernel is running as a hardware virtual machine, which is a different question from whether the current process is in a container.

The SKU on a label (2 vCPU / 8 GB) and the numbers /proc reports are not the same. Firmware and the hypervisor hold back a slice, so an 8 GB guest often reports a little under 8000 MiB. The free column and the available column are also not the same: unused RAM versus memory the kernel believes it can give to a new workload.

In this lab, you will count processors three ways, measure memory with free and /proc/meminfo, and record whose hardware this is with systemd-detect-virt --vm.

Objectives

By completing this beginner lab, you will be able to:

  • Count processors with nproc, lscpu, and /proc/cpuinfo, then record the live nproc value
  • Read free -h, free -m, free -b, and /proc/meminfo, account for the advertised-versus-reported gap, and distinguish free from available
  • Identify hardware virtualization with systemd-detect-virt --vm and the lscpu virt line, then re-read the CPU model with that context

Who is this lab for?

This lab is designed for:

  • Helpdesk and junior sysadmin students who need to read the box they are on before they size or escalate anything
  • Linux beginners who can open a terminal and want to inspect CPU, memory, and virtualization on a live host

Verified against your live environment

An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed — not multiple choice, real-world proficiency.

[CHECK] validation_activelive
Inspecting deployed resources...
Verifying configuration state...
✓ Step requirements satisfied

More labs like this

PremiumIncluded in Premium
Duration
35 min
Steps
3

Environment

Dedicated VM IDE

Every lab includes

  • Real environment, pre-credentialed
  • Automated checks on every step
  • Isolated sandbox, auto cleanup
  • AI-recommended next steps

Lab curriculum

  1. 01

    Count Processors Visible to This Linux Host

    1 automated check

  2. 02

    Measure Memory Total with free and meminfo

    1 automated check

  3. 03

    Identify Whose Hardware This Linux Host Uses

    1 automated check

Skills validated

Files and DirectoriesServer Administration

Not the lab you were looking for?

Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.

Explore the catalog