自分がよく使う、OSインストール直後のプロキシの設定方法。 UbuntuでもCentOSでも使えるはず。
echo "Defaults env_keep+=\"http_proxy https_proxy ftp_proxy no_proxy\"" > /etc/sudoers.d/proxy echo "export http_proxy=http://server:port/ export https_proxy=http://server:port/ export ftp_proxy=http://server:port/ export no_proxy=localhost,127.0.0.1" > /etc/profile.d/proxy.sh