在ubuntu系统中,开机前会先运行一个/etc/rc.loacl文件中的脚本,所以,如果想要在开机时做某些动作,可以把脚本写好放在这里
#!/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.
echo 3 > /sys/class/backlight/acpi_video0/brightness
exit 0
文件内容如上,倒数第二句是我加上的,我的是14.04,每次开机亮度都是最亮的,所以我加了一句让开机时亮度为3
当然,其他的执行语句也是可以加的,举一反三麻。
时间: 2024-10-07 00:27:19