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]

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay