Ubuntu 터미널에서 네트워크 프록시 설정

Ubuntu 터미널에서 네트워크 프록시 설정

2022-10-19 last update

5 minutes reading ubuntu tutorial terminal linux
Debian/Ubuntu에서 apt-get을 사용하여 패키지를 업데이트/설치할 수 없습니다. 인터넷이 프록시로 구성된 경우 터미널에서 네트워크에 액세스하는 것이 때때로 번거롭습니다.



As you can see in the above image, it just keeps on connecting until the server is timed out.



다음은 번거로움 없이 터미널에서 인터넷에 액세스할 수 있도록 네트워크에 프록시를 설정하는 가장 쉬운 방법입니다.

사용자는 apt-get에 대한 프록시를 설정해야 합니다. apt-get에 대한 프록시를 설정하려면 파일을 편집하십시오/etc/apt/apt.conf.

이 취득 명령을 사용하여 http 및 https int 형식 모두에 대한 프록시를 설정합니다.

Acquire::http::Proxy "http://proxy:port";
Acquire::https::Proxy "https://proxy:port";
Acquire::ftp::Proxy "ftp://proxy:port";


Note: Sometimes your OS requries authentication before setting up proxy for the network. For that use the below format,



Acquire::http::Proxy "http://[username]:[password]@ [proxy-web-or-IP-address]:[port-number]";
Acquire::https::Proxy "http://[username]:[password]@ [proxy-web-or-IP-address]:[port-number]";


The username and password are your laptops/PC's login username and password.



따라야 할 단계:


  • apt에 대한 프록시 설정을 정의하려면/etc/apt 디렉토리에 apt.conf라는 파일을 생성하거나 편집합니다(이미 있는 경우):

  • sudo nano /etc/apt/apt.conf
    


  • 파일에 다음 줄을 추가합니다.
    예를 들어,

  • Acquire::http::Proxy "http://127.0.0.1:8080";
    Acquire::https::Proxy "http://127.0.0.1:8080";
    


    Note: Here, replace these proxy and port values from your network proxy.


  • Ctrl + X를 눌러 파일을 저장한 다음 Enter를 누르십시오!
  • 이제 터미널에서 변경 사항을 업데이트하기 위해 파일을 소싱합니다.

  • source /etc/apt/apt.conf
    


  • 그게 다야! 이제 아래 명령을 실행해 보십시오.

  • sudo apt-get update
    




    여러분에게 도움이 되기를 바랍니다. 지원해 주셔서 감사합니다.
    유튜브에 설명 영상을 올렸습니다. 그것을 확인하십시오!