> ## Documentation Index
> Fetch the complete documentation index at: https://help.decodo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Linux Proxy Setup Guide

> Linux offers a variety of distributions for those interested in an alternative OS. Unfortunately, covering the setup on all of them would be unfeasible. This guide aims to provide a clear understanding of a system-wide proxy setup.

## Getting Started

Before proceeding, ensure you have:

* No other VPN or proxy active.
* The **proxy endpoint** and **port** (e.g., `us.decodo.com:10101`).
* Your **proxy username** and **password** (or a **whitelisted IP** set).

<Tip>
  **Proxy Guides**

  Learn how to find **proxy details** in your dashboard for each proxy type [**here**](https://help.decodo.com/docs/proxy-quick-start-guides).
</Tip>

## Proxy Setup

<Steps>
  <Step>
    First, open **Terminal**.

    <img src="https://mintcdn.com/decodo/HeowWjVaMvMCJRIK/images/docs/619609861053db198d94b525e880034d46a90a5d793b9435259661d09c0e60f8-Linux.png?fit=max&auto=format&n=HeowWjVaMvMCJRIK&q=85&s=47961fd9c59b4ccbc14bd6f5ffde1479" style={{ width:"64%" }} className="mx-auto" width="1880" height="1904" data-path="images/docs/619609861053db198d94b525e880034d46a90a5d793b9435259661d09c0e60f8-Linux.png" />
  </Step>

  <Step>
    Then, sign in as a root user.

    <img src="https://mintcdn.com/decodo/7Hj3tfc-1rGMirwk/images/docs/d16471140ff08e33e4055c192f0d298afde8257e3f08be85f30fb9847eb7aba5-Group_427322930.png?fit=max&auto=format&n=7Hj3tfc-1rGMirwk&q=85&s=810d7d0d47b478abe30e0c5425041255" style={{ width:"46%" }} className="mx-auto" width="1552" height="392" data-path="images/docs/d16471140ff08e33e4055c192f0d298afde8257e3f08be85f30fb9847eb7aba5-Group_427322930.png" />
  </Step>

  <Step>
    Next, open `/etc/environment` file with `nano`.

    <img src="https://mintcdn.com/decodo/IsWPiMoisao6W8vC/images/docs/d486f02101170435a1ee6d5ad3d2480614f15c77c1d0ebf464bb7425709e1aba-Group_427322930.png?fit=max&auto=format&n=IsWPiMoisao6W8vC&q=85&s=7763cfd0884445db1fd66965f0d599a9" alt="" width="2632" height="144" data-path="images/docs/d486f02101170435a1ee6d5ad3d2480614f15c77c1d0ebf464bb7425709e1aba-Group_427322930.png" />
  </Step>

  <Step>
    You should now be presented with a text editor window. **Configure** your proxy:

    ```text theme={null}
    http_proxy="http://gate.decodo.com:7000"
    https_proxy="http://gate.decodo.com:7000"
    no_proxy="localhost"
    ```

    * You can select any other endpoint from the available list. If needed, `username:password` authentication is also available via `http://username:password@gate.decodo.com:7000`.

    <img src="https://mintcdn.com/decodo/IsWPiMoisao6W8vC/images/docs/efe56b037d91a7ab6336b6eeba83428581941df4a72a0f9750619a6466b2356d-Group_427322930.png?fit=max&auto=format&n=IsWPiMoisao6W8vC&q=85&s=52565cca06e8f4add79da2bc9ea103d2" style={{ width:"64%" }} className="mx-auto" width="2400" height="536" data-path="images/docs/efe56b037d91a7ab6336b6eeba83428581941df4a72a0f9750619a6466b2356d-Group_427322930.png" />
  </Step>

  <Step>
    To finish editing the selected file, hit **CTRL + X**, then enter **Y** to save changes, and confirm the file location by pressing **ENTER**.

    <img src="https://mintcdn.com/decodo/7Hj3tfc-1rGMirwk/images/docs/bcf1e51c487964033e9496d02aa657db11c0fbe651d3e580e3bd0647f1bedcfb-Group_427322930.png?fit=max&auto=format&n=7Hj3tfc-1rGMirwk&q=85&s=356b9ddd46fa2b54fa43586429163dd1" style={{ width:"64%" }} className="mx-auto" width="2364" height="348" data-path="images/docs/bcf1e51c487964033e9496d02aa657db11c0fbe651d3e580e3bd0647f1bedcfb-Group_427322930.png" />
  </Step>

  <Step>
    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.

    <img src="https://mintcdn.com/decodo/ZzFFt4k1AMcE-z1r/images/docs/8dea1ff21124609b336f3096bffdd5d87fc39615fb0b397c3bf0cc0af25605ea-Group_427322930.png?fit=max&auto=format&n=ZzFFt4k1AMcE-z1r&q=85&s=6d3203c812ee4655eab5d90e02c89610" alt="" width="2912" height="272" data-path="images/docs/8dea1ff21124609b336f3096bffdd5d87fc39615fb0b397c3bf0cc0af25605ea-Group_427322930.png" />
  </Step>
</Steps>

### Verify the Connection

* Open a browser and visit [**ip.decodo.com**](https://ip.decodo.com/). If successful, your IP address will reflect the location of the proxy.

***

## Common Issues

### Blocklist

⚠️ Please be aware that we [**restrict access to some websites**](https://decodo.com/faq/general/do-you-have-any-blocked-sites).

### `SOCKS5`

**Residential and Mobile Proxy Support Limitations**

<AccordionGroup>
  <Accordion title="Country Targeting" icon="gear">
    The `gate.decodo.com` **endpoint** and the `7000` **port** must be used to utilize `SOCKS5` Residential or Mobile proxies. **Country** endpoints, such as `us.decodo.com`, will not function!

    You can target specific locations instead by specifying the location in your username using **advanced** **parameters**:

    * e.g.: `user-username-country-us` will connect to the **USA** pool.
  </Accordion>

  <Accordion title="Proxy Rotation" icon="gear">
    To get a **sticky** `SOCKS5` Residential or Mobile proxy in a **tool**, you must use a `session` **parameter**. Otherwise, the proxy will always rotate even with a set `sessionduration` parameter.

    * e.g.: `user-username-session-abc123-sessionduration-30` will connect to the same session.
      * The **session ID** name can be defined by any string of your choice.
  </Accordion>
</AccordionGroup>

<Note>
  Learn more in our **advanced** **parameter** guides for [**Residential**](https://help.decodo.com/docs/residential-proxy-advanced-parameters/) and [**Mobile**](https://help.decodo.com/docs/mobile-proxy-advanced-parameters/) proxies.
</Note>

### Direct IP

<AccordionGroup>
  <Accordion title="Direct IP Parameter Support" icon="gear">
    If you buy an IP list, you can specify which IPs to connect to using the **direct** `ip` parameter in the proxy username: `user-username-ip-x.x.x.x`

    * Supported products: **DC Pay/IP**, **Dedicated DC**, **ISP Pay/IP**, **Dedicated ISP** plans.
    * Products that offer access to the full proxy pool, such as residential proxies, do not support this parameter.
  </Accordion>

  <Accordion title="IP:PORT Format" icon="gear">
    * Decodo proxies don't support an `IP:PORT` format by default.
    * You must use the **endpoint** rotator format (e.g., `us.decodo.com:10101`).
    * If necessary, try the workaround [**here**](https://help.decodo.com/docs/how-to-get-ip-port-format#/), but it only works temporarily before requiring another setup update.
  </Accordion>
</AccordionGroup>

### Troubleshooting

If you experience any other issues, check out our main [**troubleshooting**](https://help.decodo.com/docs/proxy-troubleshooting) section.

***

<Columns cols={2}>
  <Card title="Support" href="https://direct.lc.chat/12092754" cta="Let's chat!">
    Need help or just want to say hello? Our support is available 24/7. \
    You can also reach us anytime via email at [support@decodo.com](mailto:support@decodo.com).
  </Card>

  <Card title="Feedback" href="mailto:feedback@decodo.com" cta="Share feedback">
    Can't find what you're looking for? Request an article! \
    Have feedback? Share your thoughts on how we can improve.
  </Card>
</Columns>
