在命令行输入一下指令:
echo 0 | sudo tee /sys/class/leds/led0/brightness //状态指示灯,范围 0-255
echo none | sudo tee /sys/class/leds/led0/trigger
echo none | sudo tee /sys/class/leds/led1/trigger
echo 0 | sudo tee /sys/class/leds/led1/brightness //电源灯
如果要每次开机生效, 可编辑/etc/rc.local文件
sudo vi /etc/rc.local
增加上面四行 ,注意: 放到 exit 0 前面
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
echo 0 | tee /sys/class/leds/led0/brightness
echo none | tee /sys/class/leds/led0/trigger
echo none | tee /sys/class/leds/led1/trigger
echo 0 | tee /sys/class/leds/led1/brightness
exit 0
参考资料:
https://www.cnblogs.com/rootming/p/12245502.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)