Make numerical keyboard (num lock) active by default on Ubuntu Server

I'm using Ubuntu 18.04.3 Server (i.e. no graphical interface, only terminal) as a virtual machine of VirtualBox. How can I make the numerical keyboard active by default directly after Ubuntu is started up, when I type my login and password (too dreary activate it manually every time)?


Solution 1:

On Ubuntu 20.04:

sudo gsettings set com.canonical.unity.settings-daemon.peripherals.keyboard numlock-state 'on'