How to Check Your Disk Speed and Performance in Ubuntu Terminal

If your Linux desktop is running slowly, applications take a long time to open, or system boot times have inexplicably increased, your storage drive may be the culprit. A failing Hard Disk Drive (HDD) or a degraded Solid State Drive (SSD) can severely bottleneck an otherwise powerful computer. Before you consider upgrading your RAM or reinstalling Ubuntu, you should check how fast your disk can actually read and write data.

While some graphical utilities exist, the Ubuntu terminal provides the fastest and most reliable way to benchmark your storage performance. You do not need to install complex benchmarking suites; you can use simple, built-in command-line tools to get immediate results.

Using the ‘dd’ Command for Write Speed

The dd command is a powerful, low-level utility used for copying and converting files. By instructing it to write a large block of zeros to a temporary file on your disk, you can measure exactly how long the process takes, giving you a clear picture of your drive’s raw write speed.

  1. Open your terminal window (you can press Ctrl + Alt + T).
  2. Type the following command exactly as written. This will create a 1 Gigabyte file named “testfile” in your current directory:
    sync; dd if=/dev/zero of=testfile bs=1M count=1024; sync
  3. Press Enter. The terminal will pause for a moment while the data is written to the disk.
  4. Once complete, the output will display the total data copied, the time it took, and the average write speed (e.g., 500 MB/s).
  5. To clean up the temporary file and reclaim your space, type: rm testfile.

Using ‘hdparm’ for Read Speed

While dd is excellent for testing write speeds, hdparm is the preferred tool for testing how quickly your drive can read data directly from the physical disk, bypassing the operating system’s cache.

  1. First, you may need to install the utility. Type: sudo apt install hdparm and press Enter.
  2. Next, you need to identify the name of your primary drive. Type: lsblk and look for the main disk (usually named something like /dev/sda or /dev/nvme0n1).
  3. Once you have identified the drive, run the test by typing:
    sudo hdparm -Tt /dev/sda
    (Replace /dev/sda with your actual drive identifier).
  4. The command will run two tests. The first tests the cached read speed (reading from RAM), and the second tests the “buffered disk reads” (the actual physical read speed of the drive). Look at the second number to judge your drive’s real-world performance.

Interpreting Your Results

When you have both your read and write speeds, compare them to the expected performance of your hardware. A standard mechanical HDD should deliver around 80 to 160 MB/s. A standard SATA SSD should reach between 400 and 550 MB/s. Modern NVMe M.2 drives can exceed 2000 MB/s. If your results are drastically lower than these benchmarks, your drive may be failing or connected to an outdated port.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.