vim /etc/init.d/mytest #!/bin/sh echo "$(pwd) and $USER and $(whoami)" >> /root/temp/1.txt; mkdir -p /root/temp/; cd /root/temp/; echo "$(pwd) and $USER and $(whoami)" >> 2.txt sudo chmod a+x /etc/init.d/mytest sudo update-…
一.添加开机启动脚本 #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parall…