分页: 1 / 1

怎样实现开机自动运行某些命令

发表于 : 2007-11-28 9:32
ahlai
我想开机自动运行如下的命令
mkfs.ext3 /dev/ram0
mount /dev/ram0 /media/ramdisk
要怎么实现,谢谢

发表于 : 2007-11-28 10:23
todaypuzzleme
以我用的dapper为例:
在/etc下找到rc.local,
vi rc.local显示默认内容如下:
#!/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.

exit 0
~

在exit 0 前面添加你要执行的命令,一行一个命令,在系统多用户级别启动完成后会执行该文件的内容

发表于 : 2007-11-28 10:25
arsui
system/Admini.../session
系统、管理,会话
添加启动项,输入命令就是了,你这么聪明一定知道的

发表于 : 2007-11-28 10:59
ahlai
todaypuzzleme 写了:以我用的dapper为例:
在/etc下找到rc.local,
vi rc.local显示默认内容如下:
#!/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.

exit 0
~

在exit 0 前面添加你要执行的命令,一行一个命令,在系统多用户级别启动完成后会执行该文件的内容
非常感谢,此方法成功