我正在使用 Lubuntu 14.04 开发 VM,
我已经创建了一个脚本 a.sh,
#!bin/bash
echo "aaaa" >> a.txt
Run Code Online (Sandbox Code Playgroud)
我的 /etc/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.
bash /home/sentinel/a.sh
echo "hey" >> …Run Code Online (Sandbox Code Playgroud)