When people work at different places/organizations, they often face issues of changing the proxy network i.e. changing IP address and DNS server.
Linux newbies often face the problem of “Request timed out” or internet connectivity in Terminal of Linux operating system’s environment.So, in this tutorial, we will see how to setup the proxy network for the terminal in Ubuntu 16.04.
If you don’t know, how to setup the proxy network in Ubuntu 16.04 then refer our previous post: How to setup proxy network in Ubuntu 16.04
How to setup the proxy network for the terminal in Ubuntu 16.04?
Follow below steps for setting up the proxy network for terminal in Ubuntu 16.04
NOTE: We suppose that you have already setup Network Proxy before following the steps down. But, if you haven’t setup the network proxy, then follow our previous post for setting up the network proxy: How to setup proxy network in Ubuntu 16.04
STEP 1: Check whether your network proxy setting is properly setup or not, Go to Setting -> Network ->Network Proxy
For example, we are taking
IP Address: 126.96.36.199 Default Gateway: 188.8.131.52
Netmask: 255.255.255.0 DNS Server: 184.108.40.206
Input Proxy address and Port for all protocols
It will ask for Administrator’s password to apply the changes. So, input Administrator’s password and hit Enter.
STEP 2: Open terminal by pressing Ctrl+Alt+T
STEP 3: Now open apt.conf file using the following command
sudo -i gedit /etc/apt/apt.conf
If you have followed STEP 1 correctly, then your apt.conf file should look like following
If your file doesn’t look like the upper image then properly follow the STEP 1.
STEP 4: Now provide Username and Password provided to you by network administrator
For Example, we are taking
Username: user123 Password: 1234
You will have to enter your provided username and password and add your Username and Password in the following format.
Save the file.
STEP 5: Now check whether internet connectivity is working or not by performing following command
sudo -i apt-get update
Great !! You have successfully setup the proxy network for the terminal in Ubuntu 16.04.
And, if your output looks like following then follow/verify all steps correctly again
In this tutorial, we learned about how to configure the proxy network for the terminal in Ubuntu 16.04.To follow steps of this tutorial first, you must have set your Network Proxy with proper IP Address, Netmask, Gateway and DNS Servers.
Now as your terminal has Internet Connectivity you can download different packages, update or upgrade your system using the terminal.
Stay tuned for upcoming tutorials 😉