💻 Software
Get total size of my hard drive in Linux, using the command line, without root permissions?
Fresh5 days ago
Mar 15, 2026111801 viewsConfidence Score0%
0%
Problem
I'm trying to find out the total size of my hard drive using , but it prints the size of each partition and requires . Is there any way to get total size of my hard drive using the command line, without requiring root permission?
Error Output
df -h
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Get total size of my hard drive in Linux, using the command line, without root permissions?
Low Risk
If you want the size in bytes and only the value e.g. for scripting: -b: Output in bytes. -n: No headings. We only want the pure number value. --output SIZE: Only print the size-column. -d /dev/sdXn: The device which size we want to know. X is e.g. …
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix