How to Check Whether a Bargain SD Card Is Fake on Ubuntu

Memory card and USB drive prices have risen sharply, making unusually cheap storage tempting. But bargain drives can be counterfeit: their controllers may report a much larger capacity than the memory chips can actually hold.
A fake drive may appear to accept files even after its real storage is full, discarding new data or overwriting existing files. The problem may only become obvious when you try to open something you saved.
On Linux, F3 (Fight Flash Fraud) is an open-source tool that checks whether a USB drive or SD card has the capacity advertised. Install it on Ubuntu, Linux Mint, or similar distributions with:
sudo apt install f3
F3 is a command-line tool, so it won’t appear in your application launcher.
Check a drive with f3probe
The quickest method is f3probe, which tests the device directly. Before testing, back up any files you want to keep. Identify the drive with lsblk, then use its full device path—not a partition path. For example, use /dev/sdb, not /dev/sdb1.
sudo f3probe /dev/your-device
Replace /dev/your-device with the correct path for your drive. Testing can take several minutes, depending on the device’s write speed. F3 will report whether the drive’s capacity matches its claim.
Run a fuller check with f3write and f3read
For a more thorough test, use f3write and f3read. These commands work with the drive’s mount point, often something like /media/username/DRIVE, rather than its /dev path.
f3write /media/your-device/
F3 fills the available space with test files, each up to 1 GB, and displays progress. Once writing is complete, read the files back and verify them:
f3read /media/your-device/
Any data the drive discarded or overwrote to fake its capacity should be reported as damaged or corrupted. Delete the test files afterward to reclaim the space.
If the drive is counterfeit
If the reported capacity is lower than advertised, consider seeking a refund. You can also use f3fix to create a partition that reflects the drive’s actual size:
sudo f3fix --last-sec=NUMBER /dev/your-device
Even if you keep the drive, avoid relying on it for important data. A counterfeit capacity may be a sign that the storage chips themselves are poor quality.