Raspberry Pi MicroSD Check Using Agnostics via CLI (Raspberry Pi)

sudo apt install agnostics

Towards the beginning of March 2020 raspberrypi.org released a tool to check the speed of a microSD card being used by the Raspberry Pi. The details for this tool, called “agnostics” can be found at https://www.raspberrypi.org/blog/sd-card-speed-test/ or if you want to install the tool then use sudo apt install agnostics . You may need to sudo apt update first.

sudo apt install agnostics
sudo apt install agnostics

Once installed agnostics is generally run from the “Accessories” part of Raspbian’s main menu. However it can also be used via the terminal / command line by accessing it in the /usr/share/agnostics directory.

/usr/share/agnostics directory

The /usr/share/agnostics directory contains 2 files and a directory:

  • sd_bench.fio (a file)
  • sdtest.sh (a file)
  • ui (a directory)

Originally I attempted to run the shell script (.sh file) using bash via bash sdtest.sh however this generated a return error that stated; “line 34: return: can only ‘return’ from a function or sourced script”.

The Line 34 return error – which was because I ran the shell file incorrectly.

The correct method is to use sh sdtest.sh which should show the some results without the line 34 error.

sh sdtest.sh


raspberrypi.org does note that older cards (or cards that have been in use) may generate a fail.


One thought on “Raspberry Pi MicroSD Check Using Agnostics via CLI (Raspberry Pi)

Comments are closed.