个人工具
登录
查看“UbuntuHelp:RcLocalHowto”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:RcLocalHowto”的源代码
来自Ubuntu中文
←
UbuntuHelp:RcLocalHowto
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/RcLocalHowto}} {{Languages|UbuntuHelp:RcLocalHowto}} == An rc.local equivalent in Ubuntu == * See /etc/rc.local == Another implementation for Debian/Ubuntu == In many distributions you can add commands to run certain programs at the end of the boot process after all system services have been started. For this purpose various distribution uses various methods. For example in Redhat based distributions we can add our own scripts or programs into the /etc/rc.d/rc.local file, however there is no such file in a Debian based system. Here is the way to accomplish the same thing the debian way: === Creatting /etc/init.d/local === <pre><nowiki> sudo vi /etc/init.d/local </nowiki></pre> This file is a shell script and it should start with: <pre><nowiki>#! wiki #!/bin/sh </nowiki></pre> === Making the file executable === Make this file executable with: <pre><nowiki> sudo chmod +x /etc/init.d/local </nowiki></pre> === link the new local file with Init === We are going to use this script a System V init script using: <pre><nowiki> sudo update-rc.d local defaults 80 </nowiki></pre> === An Example === Now you can call your scripts or pograms using this file. For example, to mount a NFS directry at boot time add the following line to /etc/init.d/rc.local <pre><nowiki> mount server.fossedu.org:/data /data </nowiki></pre> Thanks to: http://plope.com/Members/chrism/debian_rc_local_equiv Howto created by: ChinthakaDeshapriya. ---- [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:RcLocalHowto
。