Description of problem: 在龙蜥23系统中,su - 用户 -c "命令" 不会生效用户下的 .bash_profile 环境变量。而在红帽 REDHAT 中是可以生效的。 Version-Release number of selected component (if applicable):23.2 龙蜥23.2: [oracle@anolis23:/home/oracle]$ cat /etc/os-release NAME="Anolis OS" VERSION="23.2" ID="anolis" VERSION_ID="23.2" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23.2" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" [root@anolis23:/root]# su - oracle -c "sqlplus -v" -bash: line 1: sqlplus: command not found [root@anolis23:/root]# su - oracle [oracle@anolis23:/home/oracle]$ sqlplus -v SQL*Plus: Release 11.2.0.4.0 Production 红帽 8.10: [root@orcl19c:/root]# cat /etc/os-release NAME="Red Hat Enterprise Linux" VERSION="8.10 (Ootpa)" ID="rhel" ID_LIKE="fedora" VERSION_ID="8.10" PLATFORM_ID="platform:el8" PRETTY_NAME="Red Hat Enterprise Linux 8.10 (Ootpa)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos" HOME_URL="https://www.redhat.com/" DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8" REDHAT_BUGZILLA_PRODUCT_VERSION=8.10 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="8.10" [root@orcl19c:/root]# su - oracle -c "sqlplus -v" SQL*Plus: Release 19.0.0.0.0 - Production Version 19.3.0.0.0