How to Configure Proxy Settings in Ubuntu GUI and Terminal
When working with Ubuntu behind a proxy, setting up the right proxy configuration is essential for browsing, package management, and other network activities. Whether you prefer using the graphical interface or the command line, this guide will take you through practical steps to configure proxies on your Ubuntu system.
Setting Up Proxy via Ubuntu GUI
Ubuntu’s GUI makes proxy configuration straightforward and accessible without touching the terminal.
Steps to Configure Proxy in the GUI
Open Network Settings
Click the Ubuntu launcher on the left dock, then select Show applications. TypeNetworkin the search bar and open Settings > Network.Access Proxy Settings
Inside the Network menu, you will see options for Wired, VPN, and Network Proxy. Click on Network Proxy.Choose Your Proxy Type
By default, proxy settings are Disabled. Switch it to Manual to enter your proxy details.Enter Proxy Details
Fill in the proxy server details for HTTP, HTTPS, FTP, and SOCKS. For example:
Address: gw.dataimpulse.com
Port: 823
The changes are saved automatically once you close the window. Your system-wide proxy will be activated immediately.
Configuring Proxy from the Terminal
For developers and sysadmins who prefer terminal workflows, setting proxies via environment variables or configuration files is the way to go.
Temporary Proxy Settings (Current Terminal Session)
To set proxies for your current terminal session only, use the export command:
export http_proxy="http://username:password@gw.dataimpulse.com:823"
export https_proxy="http://username:password@gw.dataimpulse.com:823"
Replace
usernameandpasswordwith your actual credentials provided by your proxy provider.
This method affects only the active terminal session. To verify the proxy is active, run:
wget -qO- https://ip-api.com/
This command fetches your public IP address, helping you confirm that requests route through the proxy.
Making Proxy Settings Permanent
To avoid retyping proxy settings every time a terminal opens, you can add the environment variables into your shell’s configuration file.
- For Zsh users:
vim ~/.zshrc
- For Bash users:
vim ~/.bashrc
Add these lines at the end of the file:
export http_proxy="http://username:password@gw.dataimpulse.com:823"
export https_proxy="http://username:password@gw.dataimpulse.com:823"
Save the file and then reload it:
source ~/.zshrc # or source ~/.bashrc
Now, the proxy settings will persist for all future terminal sessions.
Enabling Proxy for All Users
To apply proxy settings system-wide, add the same http_proxy and https_proxy variables to /etc/environment:
sudo vim /etc/environment
Insert:
http_proxy="http://username:password@gw.dataimpulse.com:823"
https_proxy="http://username:password@gw.dataimpulse.com:823"
Log out and back in (or reboot) for the changes to take effect.
Setting Proxy for APT Package Manager
APT handles updates and software installations and requires explicit proxy settings if you are behind one.
- Open the APT configuration file:
sudo vim /etc/apt/apt.conf
- Add the following lines to set the proxy for HTTP and HTTPS:
Acquire::http::Proxy "http://username:password@gw.dataimpulse.com:823";
Acquire::https::Proxy "http://username:password@gw.dataimpulse.com:823";
Save and close the file. Now, whenever you run apt update or install packages, APT will use the configured proxy.
Be sure to replace
usernameandpasswordwith your DataImpulse proxy credentials to avoid authentication errors.
Why Use DataImpulse Proxies?
DataImpulse offers reliable residential proxies that work seamlessly with Ubuntu. Their proxies support HTTP, HTTPS, and SOCKS protocols and come with straightforward setup options for both GUI and terminal environments.
With flexible pricing and easy integration, it's a practical choice for developers looking to streamline proxy configurations without hassle.
You can check out more on their offerings here: DataImpulse
Summary
- Ubuntu GUI allows easy proxy setup through Settings > Network > Network Proxy.
- For temporary terminal proxy configuration, use the
exportcommand. - Make proxy settings permanent by adding them to shell config files like
~/.bashrcor~/.zshrc. - Configure APT proxy separately for package management.
- Use trusted proxy providers like DataImpulse to avoid connection and authentication issues.
By following these steps, you can have your Ubuntu machine smoothly working behind a proxy server whether through GUI or command-line.
Article images sourced from DataImpulse tutorials.



Top comments (0)