Getting Hardware Information from the Command Line

45 minutes
  • 6 Learning Objectives

About this Hands-on Lab

Being able to locate hardware information can help us ensure that hardware is being used appropriately and is helpful if we need to install additional drivers. In this hands-on lab, we will practice answering questions about host hardware.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Determine How Much Storage Is Available
  1. Run the following command:
    df -h
  2. Add the answer to the line below the corresponding question in hw_questions.txt.
Determine the Number of CPUs/Cores
  1. Run any of the following commands:
    sudo lshw
    cat /proc/cpuinfo
    lscpu
  2. Add the answer to the line below the corresponding question in hw_questions.txt.
Determine the CPU Speed
  1. Run one of the following commands:

    sudo lshw
    cat /proc/cpuinfo
  2. Add the answer to the line below the corresponding question in hw_questions.txt.

Determine How Much RAM Is Installed
  1. Run any of the following commands:

    sudo lshw
    sudo cat /proc/meminfo
  2. Add the answer to the line below the corresponding question in hw_questions.txt.

Determine How Much Swap Is Being Used
  1. Run the following command:
    free -m
  2. Add the answer to the line below the corresponding question in hw_questions.txt.
Determine the BIOS Version
  1. Run one of the following commands:
    sudo lshw
    sudo dmidecode
  2. Add the answer to the line below the corresponding question in hw_questions.txt.

Additional Resources

You have been tasked with assessing the hardware profile of a remote host. You need to answer the following questions:

  • How much storage is available?
  • How many CPUs/cores are there?
  • What is the CPU speed?
  • How much RAM is installed?
  • How much swap is being used?
  • What is the BIOS version?

These questions are listed in /home/cloud_user/hw_questions.txt, and the answers should be placed in this file.

Note: For memory information, use: sudo cat /proc/meminfo

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?