Answers:
对。有办法
/etc/kbd/config用您喜欢的编辑器打开。
搜索显示的行LEDS=+num。如果我没记错的话,应该在第67行。
取消注释。我认为您知道如何取消注释,因为我认为您知道脚本。
利润。
/etc/kbd/config。我尝试过sudo touch /etc/kbd/config,但是它抱怨说“没有这样的文件或目录”。
                    尽管这并不能直接回答Raspbian Jessie问题,但对于那些运行Raspbian Stretch的其他Googler(没有)/etc/kbd/config,以下是解决方案:
sudo apt-get install numlockxsudo nano /usr/share/lightdm/lightdm.conf.d/01_debian.confgreeter-setup-script=/usr/bin/numlockx on资料来源:
https://www.raspberrypi.org/forums/viewtopic.php?t=192383
依次引用:
/etc/kbd/config已在Raspbian Stretch中删除,但您可以使用/usr/bin/setleds来设置numlock状态。
例如,要在所有VT中启用numlock:
#!/bin/bash
# Turn Numlock on for the TTYs:
for tty in /dev/tty[1-6]; do
    /usr/bin/setleds -D +num < "$tty";
done
您将此脚本放在中/usr/local/bin/numlock,并在启动时调用它,例如使用systemd服务(/etc/systemd/system/numlock.service):
[Unit]
Description=numlock
[Service]
ExecStart=/usr/bin/numlock
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
使用启用服务systemctl enable numlock.service。
来源:http://forums.debian.net/viewtopic.php?t = 134006#p650222
命令行:
sed -i 's/#LEDS=+num/LEDS=+num/' '/etc/kbd/config'