阿里云 启动脚本

如果把启动脚本放在/etc/profile.d目录下,每次打开新的窗口脚本就会执行一次,所以要判断程序是否已经启动,避免重复启动

1.将脚本放在这个目录下/etc/profile.d

2.touch test.sh

#!/bin/bash
echo "aliyuntest" > /test.txt

3.打开新的窗口

猜你喜欢

转载自blog.csdn.net/weixin_42627035/article/details/85002458