0Pricing
DevOps Bootcamp · Lesson

Disk Usage & System Info (df, du, uname)

Monitor disk space, file sizes, and retrieve system information using commands like 'df', 'du', and 'uname'.

Disk Usage & System Info (df, du, uname) is a free DevOps Bootcamp lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why Monitor Disk & System Info?

Understanding your system's disk usage and core information is crucial for maintaining a healthy and efficient Linux environment.

  • Resource Management: Know when disk space is running low.
  • Troubleshooting: Identify oversized files or directories.
  • System Awareness: Get details about your operating system kernel and architecture.

Checking Free Disk Space with `df`

The df command, short for 'disk free', displays the amount of available disk space for filesystems mounted on your system.

It shows:

  • Filesystem name
  • Total size
  • Used space
  • Available space
  • Usage percentage
  • Mount point

Making `df` Output Human-Readable

By default, df shows sizes in 1-kilobyte blocks, which can be hard to read. The -h option makes the output much friendlier.

It converts sizes to human-readable units like KB, MB, or GB, making it easy to quickly grasp disk usage.

Run `df -h`

Try running df -h to see the free disk space on your system in an easy-to-understand format.

df -h

Finding Disk Usage with `du`

While df tells you about *free* space on filesystems, du (disk usage) tells you about the space *used* by specific files or directories.

It's great for finding out which files or folders are consuming the most space within a directory.

Summarizing Directory Usage with `du -sh`

To get a quick summary of a directory's total size, you often combine two options with du:

  • -s: Displays only a total for each argument.
  • -h: Shows sizes in human-readable format (e.g., 10M, 2.5G).

Using du -sh . will show the total size of the current directory.

Run `du -sh`

Let's find out the total disk usage of your current working directory using du -sh .

du -sh .

Getting System Info with `uname`

The uname command (short for 'UNIX name') is used to display system information. This includes details about the operating system kernel.

It's useful for quickly checking what version of Linux you're running or the system's architecture.

Comprehensive System Details: `uname -a`

To get a comprehensive overview of your system's information, use the -a (all) option with uname.

This will typically show the kernel name, network node hostname, kernel release, kernel version, machine hardware name, processor type, hardware platform, and operating system.

Try `uname -a`

Execute uname -a to view all available system information about the machine you are currently on.

uname -a

Quick Check: Disk & System Commands

Which of these commands are used to check disk or system information?

Lesson Summary: Disk & System Insights

In this lesson, you learned how to effectively monitor your Linux system's disk usage and retrieve essential system information.

  • df: Shows free disk space on mounted filesystems.
  • du: Displays disk usage of files and directories.
  • uname: Provides core system and kernel information.

These commands are vital for system administration, troubleshooting, and keeping your Linux environment running smoothly!

Frequently asked questions

Is the “Disk Usage & System Info (df, du, uname)” lesson free?

Yes — the full text of “Disk Usage & System Info (df, du, uname)” is free to read here on the web, and the DevOps Bootcamp course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the DevOps Bootcamp course, upgrade to CoddyKit PRO.

What will I learn in “Disk Usage & System Info (df, du, uname)”?

Monitor disk space, file sizes, and retrieve system information using commands like 'df', 'du', and 'uname'. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start DevOps Bootcamp?

No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Disk Usage & System Info (df, du, uname)” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this DevOps Bootcamp lesson?

Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Advanced Text Manipulation (sed, awk)
  2. Archiving and Compression (tar, gzip, unzip)
  3. Disk Usage & System Info (df, du, uname)
  4. Sorting & Deduplicating Data (sort, uniq, cut)
← Back to DevOps Bootcamp