Skip to content

Linux

The Linux build is one static binary for x86-64 and ARM64, with no libraries. Install it with the installer script or Homebrew. Everything works as on the Mac, with these differences:

  • Root: reading SMART goes through the kernel’s SG_IO and NVMe ioctls, which need root, so use sudo smartdisk. Without root the list still shows the disks.
  • USB disks are read like internal ones. The kernel passes ATA PASS-THROUGH to SAT bridges, so nothing is ejected and libusb is not needed. smartdisk usb does the same.
  • Disk names are the kernel’s: sda, nvme0n1, mmcblk0. Partitions (sda1, nvme0n1p2) select their disk.
  • Raw I/O (read test, benchmark, rescue, repair, wipe, capacity) uses O_DIRECT, so the page cache does not flatter the speeds. Writing opens the disk exclusively: the kernel refuses while a file system on it is mounted.
  • Formatting (format, wipe, capacity) creates one MBR partition with exFAT (mkfs.exfat, package exfatprogs) or FAT32 (mkfs.vfat, package dosfstools). APFS and Mac OS Extended are Mac-only. Unmounted volumes are mounted back where they were.
  • Self-tests run on SATA and USB-SATA drives and can be aborted on internal drives too. NVMe self-tests are not supported yet.
  • System disk: disks holding /, /boot, /boot/efi or /usr (also through LVM, LUKS or RAID) count as the system disk and are refused for erasing, like a Mac’s startup disk.
  • smartdisk install names the distribution packages instead of using Homebrew.

Realtek USB-to-NVMe adapters are read through Realtek’s pass-through, as on the Mac.