check current mariadb version code example
Example: mariadb find version
As the mysql works for maria, you also can use it to find version
mysql -v
OUTPUT-> mysql Ver 15.1 Distrib 10.4.7-MariaDB, for debian-linux-gnu
(x86_64) using readline 5.2