在脚本#!/bin/sh下中加入. /etc/profile即可 #!/bin/sh . /etc/profile echo "cn.kawins 2018-6-8" set -e 至于为什么请点击这里查看