How to Check Real USB Capacity in Linux Terminal

So you bought a USB flash drive to create a Linux live USB. But how do you know it’s not fake?  f3, which stands for fight flash fraud, can test real USB capacity. This tutorial shows you how.

Install F3 on Linux

For Debian, Ubuntu, Linux Mint, Elementary OS users, f3 is available in software repository. Simply execute the command below:

sudo apt install f3

Arch Linux, Manjaro, Apricity OS users can install f3 from AUR repository with Yaourt package manager.

yaourt f3

Fedora-based distros:

sudo dnf install f3

Checking USB Capacity

Before testing the real capacity, make sure the data on the flash drive is backed up and then format it, which can be done with Gparted partition editor.


Close Gparted when it’s done.

Now back in your terminal,  use f3write command to let f3 write a file to your flash drive.

f3write /media/flash-drive-mount-point

When writing to flash drive, f3write fills the filesystem with 1GB files named N.h2w, where N is a number (i.e. /[0-9]+/).

f3 check usb capacity

Then use f3read command to check if the file can be read.

f3read /media/flash-drive-mount-point


If you see from the output that some sectors are corrupted, then your USB flash drive is fake. You should ask for your money back.


F3 also comes with a command line utility named f3probe, which is recommended for testing USB flash drives of large capacity due to its fast test speed.

First find out the block device name of your flash drive with lsblk command:


Mine is /dev/sdb. Make sure you identified it correctly.


Then run the following command. Replace /dev/sdb with the actual block device name of your flash drive.

sudo f3probe --destructive --time-ops /dev/sdb


If the usable size equals announced size, then your USB drive is not fake. Otherwise you should ask for your money back.

That’s it! I hope this tutorial helped you verify USB capacity in Linux. As always, if you found this post useful, then please subscribe to our free newsletter or follow us on Google+Twitter or like our Facebook page. Thanks for visiting!

Rate this tutorial
[Total: 22 Average: 4.3]

One Response to “How to Check Real USB Capacity in Linux Terminal

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community ( for questions unrelated to this article.
  • If my answer helped you, please consider supporting this site. Thanks :)