Linux Tweak #1 – Disable Num Lock Hint

I’ve been a Linux admin and user for nearly 23 years. For the last several years I have not had a local Linux system and have performed all my work remotely via SSH. As a result, I never noticed the Num Lock hint that was introduced quite some time ago. I now work with some local system and I see this message on a regular basis. Although there are people who find this hint helpful, I find it distracting since I prefer to have my Num Lock all the time.

If you wish to disable this hint, it is an easy task to do so. If you are using a Linux distribution that still uses /etc/initab, simply edit the file and add the command line option --nohints to all lines that invoke agetty. The run kill -HUP 1 to cause the init process to reload its configuration. The next time agetty respawns the hint will not be displayed.

However, Ubuntu 16.04.3 LTS uses systemd and the method to disable to hint is less straightforward but not complicated. You need to edit the getty service configuration for systemd. The configuration file is located in the /lib/systemd/system directory and is named getty@.service. (No, the @ is not a typo.) Edit this file with your preferred text editor and scroll down to the ExecStart line in the {Service} section of the file. This line contains the full command used to start agetty.

Just after the --noclear options, insert the option --nohints. Then save and exit the file.

Then, run systemctl daemon-reload to force systemd to load the new configuration.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s