首页 > 系统服务 > 详细

ubuntu 的开机自启动文件

时间:2015-06-02 15:26:37      阅读:291      评论:0      收藏:0      [点我收藏+]

在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

当然,其他的执行语句也是可以加的,举一反三麻。

本文出自 “灵哥笔记” 博客,请务必保留此出处http://kinghacker.blog.51cto.com/7767090/1657481

ubuntu 的开机自启动文件

原文:http://kinghacker.blog.51cto.com/7767090/1657481

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!