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: 20 Average: 4.6]

5 Responses to “How to Check Real USB Capacity in Linux Terminal

  • Ignacio T.
    1 year ago

    Thanks a lot

  • Will Noble
    1 year ago

    Mt grateful thanks for the use of your software. I’m no technowhizz but I followed it carefully and got the check done. I’d become concerned about 2 x 128Gb Samsung EVO Plus microSDXC class 10 cards. They showed ALL of the features that others said indicated a fake, ie, black card edges – not white, packaging slots not fully punched through, made in Korea – not the Philippines, not in truly tamper-proof packs, generic, non-Samsung SD adapters, etc.
    They checked out at 116Gb each, passed the read/write test at that figure except for one with a loss of 16.32 Mb, at roughly 16Mb/sec on a bog standard USB2 OTG adapter into my laptop.
    F3 probe also declares them a pass and ‘the real thing’ but the thing I am suspicious of is the capacity. Should it not be nearer 128Mb? If it makes any odds, they were FAT32 formatted by G-Parted.

  • Les Wilkinson
    1 year ago

    I just stumbled upon your software and I am so glad that I did I have not been using Linux for long so I guess I am a newbie I purchased two supposedly 2TB USB flash drives on ebay but became suspicious that they where not what they calmed to be and as I say I found your software and it was so easy to use it confirmed that my USB drives are only 1TB and not 2TB as stated using your evidence (I sent them a copy of my terminal results ) I contacted the seller and was reimbursed my purchase money and told me to keep the USB Drives

    many thanks for this software I

  • Could I suggest you change the reference in the code from `/dev/sdb` to `/dev/sdx`.

    Newbies might cut and paste `sudo f3probe –destructive –time-ops /dev/sdb`, and due to the –destuctive flag, will probably trash their second drive.

    • Blueswerks
      3 seconds ago

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


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.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB.
You can upload: image.