ENV

From ElectroDragon
Revision as of 08:43, 9 October 2019 by Chao (talk | contribs)
Jump to navigation Jump to search

1) 修改etc/profile

此文件为系统的每个用户设置环境信息。当用户登录时,该文件被执行一次,并从 /etc/profile.d 目录的配置文件中搜集shell 的设置。一般用于设置所有用户使用的全局变量。

Set Proxy

  • /etc/profile
PROXY_HOST=127.0.0.1
export all_proxy=http://$PROXY_HOST:8118
export ftp_proxy=http://$PROXY_HOST:8118
export http_proxy=http://$PROXY_HOST:8118
export https_proxy=http://$PROXY_HOST:8118
  • source /etc/profile