修改profile文件在/etc/profile.d/目录下创建脚本:sudonano/etc/profile.d/myscript.sh#!/bin/bash/path/to/your/script.sh&自启动: