[英]How to unset proxy on terminal in Ubuntu 14.04?
我已嘗試使用所有方法永久清除代理設置。 我檢查了 /etc/environment、~/.bashrc、bashrc.bashrc 並注釋掉/刪除了代理命令。 還嘗試了 unset http_proxy 和 unset https_proxy 但沒有任何效果。 這是我在嘗試 sudo apt-get update 命令時得到的終端屏幕請建議一種永久刪除代理設置的方法。 提前致謝。
嘗試檢查文件/etc/apt/apt.conf.d/90curtin-aptproxy
當我安裝 Ubuntu 18.04.2 LTS 時,我的代理設置在那里設置。
希望這可以幫助。
您可以在askubuntu.com上獲得此類問題的更好答案。
無論如何,只需將System/Network中的方法下拉列表從manual
更改為none
。 這將完成你的任務。 執行此操作后,您可能需要重新啟動機器。
更新:
嘗試使用 null 導出 http_proxy。例如: $ export http_proxy=""
或者$ export http_proxy=
還要檢查 /etc/profile.d 文件夾內容。
在您的 HOME 目錄中查找文件 /etc/wgetrc 或 file.wgetrc。 代理可能在這些文件中設置。
您需要編輯位於 /etc/environment 的文件: 1) 打開環境文件xhost +local: && sudo gedit /etc/environment
now comment the lines containg proxy using #
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
#http_proxy="http://172.16.2.30:8080/"
#https_proxy="https://172.16.2.30:8080/"
#ftp_proxy="ftp://172.16.2.30:8080/"
#socks_proxy="socks://172.16.2.30:8080/"
現在保存文件。這應該可以解決問題
2)如果在執行 1 之后問題仍然存在,請嘗試從位於 /etc/apt/ 的 apt.conf 文件中刪除代理。首先使用xhost +local: && sudo gedit /etc/apt/apt.conf
。現在刪除它的內容並保存它。
取消設置 https_proxy
取消設置 http_proxy
要么
https_proxy=''
http_proxy=''
注意=周圍沒有空格
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.