Linux 每次开机都要 source /etc/profile 的解决方法

概述

前两天安装了 go,然后在/etc/profile 里加了环境变量,当时 source 之后也没发现什么问题,然后关机之后重启就发现环境变量竟然没有生效。还得使用 source 命令,吐血

解决方法

在用户目录下的.bashrc 中添加一句

source /etc/profile

发表评论