DEV Community

GaMa
GaMa

Posted on

2 1

Setting a Proxy in Ubuntu

To configure the proxy in Ubuntu you can set it in different places:

apt

In order to use apt with a proxy you have to edit the /etc/apt/apt.conf file with the following:

Acquire::http::proxy "http://username:password@host:port/";
Acquire::ftp::proxy "ftp://username:password@host:port/";
Acquire::https::proxy "https://username:password@host:port/";
Enter fullscreen mode Exit fullscreen mode

Environment Variables

To add the proxy as an environment variable, edit the /etc/environment file with the following:

http_proxy=http://username:password@host:port/
ftp_proxy=ftp://username:password@host:port/
https_proxy=https://username:password@host:port/
Enter fullscreen mode Exit fullscreen mode

gtk3 programs

For gtk3 programs, use the proxy settings in network settings.

I got the information from: [https://www.quora.com/How-do-I-set-the-proxy-setting-using-Linux-command-line-on-Ubuntu-14-04]

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay