Which file do I need to modify my.cnf MariaDB on Ubuntu 18.04 I want to modify these values:

[mysqld]
key_buffer_size    = 256M
max_allowed_packet  = 128M
thread_stack    = 256K
query_cache_limit  = 64M
query_cache_size        = 384M
innodb_buffer_pool_size = 1073741824
thread_cache_size = 256
back_log = 256
thread_handling = pool-of-threads


I've tried to edit the files that MariaDB says:

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf 


But none of them seems to apply changes.

I'm running last version of MariaDB on Ubuntu 18.04 
(10.1.34-MariaDB-0ubuntu0.18.04.1)

I've checked Stack Overflow before asking, including How do I find the MySQL my.cnf location
I had a similar problem but rectified it by adding the following line to /etc/mysql/my.cnf

!include /etc/mysql/mariadb.cnf

This seemed to fix the issue of the mariadb config file not being read.