First install numlockx
$ sudo apt-get install numlockx
Method 1$ sudo vim /etc/rc.local
Add the following content before exit 0
1 | if [-x /usr/bin/numlockx ]; then |
Method 2$ sudo vim /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
Add greeter-setup-script=/usr/bin/numlockx on
at the end.