Tested on a Ubiquiti EdgeRouter 4 with dnsmasq enabled for DHCP (and DNS) serving.
These operations can also be carried out in the EdgeRouter web gui with the "DNS host names" Wizard (click the "Wizards" tab and then select "DNS host names" to access).
To see all currently statically mapped hosts:
$ cat /etc/hosts
or, using the actual CLI:
$ configure
# show system static-host-mapping
# exit
$
To add a static host mapping and an alias:
$ configure
# set system static-host-mapping host-name test.example.com inet 10.0.1.24
# set system static-host-mapping host-name test.example.com alias test
# commit
# save
# exit
$
To add a couple of more aliases:
$ configure
# set system static-host-mapping host-name test.example.com alias test2.casalembo.com
# set system static-host-mapping host-name test.example.com alias test3.casalembo.com
# commit
# save
# exit
$
To remove static mapping and all aliases:
$ configure
# delete system static-host-mapping host-name test.example.com
# commit
# save
# exit
$