This article will present you with the command line method to change proxy settings on the Ubuntu desktop.
To change the system proxy setting in Ubuntu by using the command line, we will use the gsettings. The gsettings is a command line tool which is used in Ubuntu to modify the database settings. gsettings in Ubuntu enable users to monitor or set keys for changes; It is used to manage applications’ settings
To change the proxy settings on the Ubuntu system, use the below-mentioned command to run the gsettings tool:
Once the gsetting tool is started, you can easily change the proxy settings by following the syntax of the below-mentioned commands:
Now I will use the above commands to change the proxy settings for each; HTTP, HTTPS, FTP and Socks.
HTTP proxy is used to identify suspicious web content that is coming from a non-trusted source. It is required in Ubuntu to protect the HTTP server from miscellaneous attacks. To set up the HTTP proxy settings, run the below-mentioned commands to determine the host (server name or IP) and port for HTTP:
Note: Here, I have used the IP address as host but that is just an example IP.
The below-mentioned command determines the port for http proxy:
To verify that the http proxy is changed/updated successfully;
Hypertext Transfer Protocol over Secure Socket (HTTPS) is basically a request protocol between server and clients to provide a secure transaction and communication for users. To determine the host for https proxy, run the below-mentioned command:
After that determine the port for HTTPS by using the below-mentioned command:
Then verify by using the below-mentioned command:
FTP proxy acts as a bridge/relay to transfer files between source and destination. Its performance is better for larger files than HTTP. To change the FTP proxy, run the below-mentioned commands to determine both the host and port on the Ubuntu system:
Then verify, by using the below-mentioned echo command
SOCKS proxy facilitates communication between servers by using a firewall, it supports routing any type of traffic generated by any program or protocol. Similar to all of the above, the socks proxy can also be changed with the gsetting tool and for that, use the below-mentioned commands:
For example;
All the above-mentioned commands will change the proxy setting for the current user, but if you want to imply same proxy changes system-wide then run all the commands with sudo to have administrative permission to change the system proxy:
Just to quote the example; here I have only changed the “http” proxy setting for the whole system. You can change your desired proxy settings for the complete system by following the same commands mentioned in the previous section just remember to use “sudo” with them:
There are three proxy setting modes in the Ubuntu system and those are:
Run the below-mentioned commands to switch the proxy mode to “auto mode”, this is useful if you are using PAC (Proxy Auto-Config) in Ubuntu.
Switch to auto mode through the following command:
The manual mode is used if you want to manually change each proxy settings as we did in the first two sections of this article.
If you do not want any proxy changes being applied to your system then you can clear all proxy settings by using the below-mentioned command:
To change the system proxy setting in Ubuntu through the command line, the gsetting tool is used. All the proxy settings can be modified/changed with the gsetting tool. The command and syntaxes for each proxy setting are discussed in the above-mentioned guidelines. The proxy modes “auto”, “manual” and “none” are also discussed above along with commands for each mode.
In this article, we will see how to Install Google Cloud BigQuery Python client library…
Nov 15,2024 Wallpaper Contest for Xfce 4.20 open for voting The submission phase for the…
MicroCloud 2.1.0 LTS is now available, expanding the number of Canonical infrastructure solutions with a…
Canonical is thrilled to be joining forces with Dell Technologies at the upcoming Dell Technologies…
In today’s massive private mobile network (PMN) market, one of the most common approaches to…
Welcome to the Ubuntu Weekly Newsletter, Issue 865 for the week of November 3 –…