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. This is lesson 3 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, and your progress syncs across the web and the CoddyKit app. The DevOps Bootcamp course includes 4 lessons in total.
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 -hFinding 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 -aQuick 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!
Learn DevOps Bootcamp with an AI tutor — free
Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.
- Courses
- 142
- Lessons
- 568
Frequently Asked Questions
Is the “Disk Usage & System Info (df, du, uname)” lesson free?
Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Disk Usage & System Info (df, du, uname)”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The DevOps Bootcamp course includes 4 lessons in total.
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, so you can start here or from the beginning and move at your own pace. This is lesson 3 of 4.
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
- Advanced Text Manipulation (sed, awk)
- Archiving and Compression (tar, gzip, unzip)
- Disk Usage & System Info (df, du, uname)
- Sorting & Deduplicating Data (sort, uniq, cut)