[英]How do we set the environment variable permanently in ubuntu based EC2 machien in AWS?
基本上,我们希望在基于 ubuntu 的 EC2 机器中永久设置环境变量,以便容器或其他进程可以获取它。
您可以连接到 EC2 实例并在环境文件中编辑它,如下所述:-
sudo nano cd /etc/environment
#Write the name of the environment variable which you want to set in the below format
ENV_NAME="test"
#Close the file by Ctrl+x and execute the below command to reload the variables
source /etc/environment
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.