In the terminal, we can type mariadb -V (uppercase V) to display the current MariaDB version installed on the server.
Terminal
$ mariadb -V
mariadb Ver 15.1 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
The above output show MariaDB version 10.5.19 is installed on the server.
Server System Variables
Alternatively, we can connect to MariaDB and use show variables to display the MariaDB server system variables.
Terminal
$ sudo mariadb -u root
MariaDB [(none)]> show variables like "%version%";
+-----------------------------------+------------------------------------------+
| Variable_name | Value |
+-----------------------------------+------------------------------------------+
| in_predicate_conversion_threshold | 1000 |
| innodb_version | 10.5.19 |
| protocol_version | 10 |
| slave_type_conversions | |
| system_versioning_alter_history | ERROR |
| system_versioning_asof | DEFAULT |
| tls_version | TLSv1.1,TLSv1.2,TLSv1.3 |
| version | 10.5.19-MariaDB-0+deb11u2 |
| version_comment | Debian 11 |
| version_compile_machine | x86_64 |
| version_compile_os | debian-linux-gnu |
| version_malloc_library | system |
| version_source_revision | f8a85af8ca1c937b8d4f847477bd282f80251cde |
| version_ssl_library | OpenSSL 1.1.1n 15 Mar 2022 |
| wsrep_patch_version | wsrep_26.22 |
+-----------------------------------+------------------------------------------+
15 rows in set (0.001 sec)