Install Badblocks On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS
badblocks
Maintainer: Theodore Y. Ts'o
Email: [email protected] .
Website: http://e2fsprogs.sourceforge.net
Section: admin
Install badblocks
-
Debian
apt-get install e2fsprogsClick to copy -
Ubuntu
apt-get install e2fsprogsClick to copy -
Alpine OS
apk add e2fsprogsClick to copy -
Arch Linux
pacman -S e2fsprogsClick to copy -
Kali Linux
apt-get install e2fsprogsClick to copy -
CentOS
yum install e2fsprogsClick to copy -
Fedora
dnf install e2fsprogsClick to copy -
Raspbian
apt-get install e2fsprogsClick to copy -
macOS
brew install e2fsprogsClick to copy
Search a device for bad blocks. Some usages of badblocks can cause destructive actions, such as erasing all the data on a disk, including the partition table.
How to use badblocks?
Below are few example commands for badblocks that you can use in the terminal.
Search a disk for bad blocks by using a non-destructive read-only test:sudo badblocks /dev/sdaClick to copySearch an unmounted disk for bad blocks with a non-destructive read-write test:sudo badblocks -n /dev/sdaClick to copySearch an unmounted disk for bad blocks with a destructive write test:sudo badblocks -w /dev/sdaClick to copy
Installation of latest badblocks command is available for Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.




