The exact instructions will depend on which version of Linux you are using. Assuming you are using a Debian derived distribution (e.g Debian, Ubuntu, RPIOs, etc), the following should get you a PostgreSQL database installed and ready to use. We start by assuming that you can log in as user 'myuid' and have sudo access.
[myuid@myhost]:~ $ apt list postgresql-*
[myuid@myhost]:~ $ sudo apt install postgresql-13
[myuid@myhost]:~ $ sudo su - postgres -c "createuser myuid"
[myuid@myhost]:~ $ sudo su - postgres -c "createdb myuid"
[myuid@myhost]~ $ psql
psql (13.4 (Ubuntu 13.4-0ubuntu0.21.04.1), server 12.8 (Ubuntu 12.8-0ubuntu0.20.04.1))
Type "help" for help.
myuid=> /q
[myuid@myhost]~ $
The procedure for other databases are similar. If you choose to use MySQL/MariaDB or Firebird, you'll have to do some research on how to create users and databases and what the CLI command is for them. Another possibility is to uses SQLite, which has some limitations since it is not a full DBMS - but if you're only interested in learning SQL, its a good place to start.
Note that the 'postgresql-13' package does not include any of the development packages. If you are wanting to do programming, you will, at a minimum, want to install postgresql-server-dev-13 package. Replace 13 with 11, 12 or 9 as per your installed postgresql package. You may then want to add python or C++ or other language support, if available, if you are looking at using something other than programming in C