Instructions on how to set up proxy on Linux

How to set up proxy on Linux

Linux offers a variety of distributions for people interested in alternative OS. Unfortunately, it would be impossible to cover the set up on all of them. This guide will provide a good understanding of a system-wide proxy setup.

  1. First, open Terminal.
Linux – open TerminalLinux – open Terminal

Linux – open Terminal

  1. Then, sign in as a root user.
Linux – sign inLinux – sign in

Linux – sign in

  1. Next, open /etc/environment file with nano.
Linux – open a fileLinux – open a file

Linux – open a file

  1. You should now be presented with a text editor window. Configure your proxy:

You can select any other endpoint from the available list. If needed, username:password authentication is also available via http://username:[email protected]:7000.

Linux – configure your proxyLinux – configure your proxy

Linux – configure your proxy

  1. To finish editing the selected file, hit CTRL + X, then enter Y to save changes, and confirm the file location by pressing ENTER.
Linux – finish editing the fileLinux – finish editing the file

Linux – finish editing the file

  1. Finally, lock the file and reboot your machine. Please note that proxy changes may disappear if you skip this step.

To lock the file, enter chattr +i /etc/environment. To unlock it later, you can use the -i flag.

Linux – lock the fileLinux – lock the file

Linux – lock the file