Linux虚拟机开启键盘灯
在/bin目录下新建led这个文件
status=/tmp/keyboard_led_status
if [[ ${1} == "on" ]] || [[ ! -e ${status} ]]; then
xset led named 'Scroll Lock' && echo "on" > ${status}
else
xset -led named 'Scroll Lock' && rm -f ${status}
fi
赋予该文件可执行权限
chmod 777 /bin/led
然后在终端里执行即可开启键盘灯
/bin/led
即可成功开启键盘灯
本文来自博客园,作者:夜未至,转载请注明原文链接:https://www.cnblogs.com/wushiyiwuzhong/p/18015095