> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/integrations/proxy-integrations/ubuntu.md).

# Ubuntu

[**Ubuntu**](https://ubuntu.com/) is an open-source software operating system on Linux for enterprise servers, desktops, the cloud, and IoT.

There are multiple ways to set up a proxy server for Ubuntu. In this guide, you'll find two common methods: [using System (GNOME) settings](#method-1-system-settings) and [utilizing the terminal](#method-2-terminal-sessions). for the following Oxylabs proxy types:

* **Residential & Mobile Proxies**
* **Datacenter Proxies**
* **Dedicated Datacenter Proxies (Enterprise)**
* **Dedicated Datacenter Proxies (Self-service)**
* **ISP Proxies**
* **Dedicated ISP Proxies**

## Method 1: System settings

To set up a system-wide network proxy, follow the steps below:

### **Step 1**

[**Download**](https://ubuntu.com/download/desktop) and install Ubuntu Desktop.

### **Step 2**

Find **Settings** from the Ubuntu launcher and go to the **Network** tab.

<figure><img src="/files/RlnMXXH5B7JkhRXeQZV6" alt="Network"><figcaption></figcaption></figure>

### **Step 3**

Once you click on **Network**, it will open up a new dialog. From the three options, choose **Network Proxy.**

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiwDdoZGfMbUe5cRL2417%2Fuploads%2F0QpbIwlPPRIdIB3jYFza%2Fimage.png?alt=media&#x26;token=e78a2185-2744-409b-9ae8-5f0307963093" alt="Network"><figcaption></figcaption></figure>

### **Step 4**

Select **Manual** to configure proxy settings. Next, several text boxes will pop up from which you can set `HTTP`, `HTTPS`, or `SOCKS` proxy. Fill in the details for your chosen proxy type:

* [**Residential & Mobile Proxies**](#residential-and-mobile-proxies)
* [**Datacenter Proxies**](#datacenter-proxies)
* [**Dedicated Datacenter Proxies (Enterprise)**](#dedicated-datacenter-proxies-enterprise)
* [**Dedicated Datacenter Proxies (Self-service)**](#dedicated-datacenter-proxies-self-service)
* [**ISP Proxies**](#isp-proxies)
* [**Dedicated ISP Proxies**](#dedicated-isp-proxies)

#### Residential & Mobile Proxies

**Available protocols:** `HTTP`, `HTTPS`, `SOCKS5`

**Host/IP**: `pr.oxylabs.io`

**Port**: `7777`

<figure><img src="/files/h8XfmPRN9kRVs4LJ61tq" alt="Network Proxy" width="563"><figcaption></figcaption></figure>

You may also use **additional parameters** with residential and mobile proxies to set the geo-location (country, state, city, and etc.) and control sessions. Check out the [Residential Proxies documentation](/products/proxies/residential-proxies.md) to learn more.&#x20;

#### Datacenter Proxies

**Available protocols:** `HTTP`, `HTTPS`, `SOCKS5`

**Host/IP:** `dc.oxylabs.io`

**Port:** `8001`

<figure><img src="/files/zhm3KJdun3OmjXHp4AH8" alt="" width="563"><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Pay-per-IP subscription" %}
The port is the sequential number assigned to an IP address from the [proxy list](/products/proxies/datacenter-proxies/proxy-list.md). Thus, port `8001` uses the first IP address from your list. You may also enable [proxy IP rotation](/products/proxies/datacenter-proxies/ip-control.md) by setting the port to `8000`.

Furthermore, you can specify the [geo-location](/products/proxies/datacenter-proxies/select-country.md), for example, the US, by setting the **Proxy username** to `user-USERNAME-country-US`.
{% endtab %}

{% tab title="Pay-per-traffic subscription" %}
The port `8001` picks a random IP address but stays consistent during a session. Alternatively, you can [rotate proxy IPs](/products/proxies/datacenter-proxies/ip-control.md) with each request by using port `8000`.

If you want to use a specific [geo-location](/products/proxies/datacenter-proxies/select-country.md), for example, the US, set the Proxy username to `user-USERNAME-country-US`.
{% endtab %}
{% endtabs %}

#### Dedicated Datacenter Proxies (Enterprise)

**Available protocols:** `HTTP`, `SOCKS5`

**Host/IP:** `1.2.3.4` (IP address from your [proxy list](/products/proxies/dedicated-datacenter-proxies/enterprise/proxy-lists.md))

**Port:** `60000` (HTTP) or `1180` (SOCKS5)

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiwDdoZGfMbUe5cRL2417%2Fuploads%2Fj415y9XFS32RYS9BaV9H%2Fimage.png?alt=media&#x26;token=7d2e8572-e17e-484a-87ba-4d1022b7ad76" alt="Configuring proxy" width="563"><figcaption></figcaption></figure>

For Enterprise Dedicated Datacenter Proxies (purchased via sales), you’ll have to choose an IP address from the acquired [proxy list](/products/proxies/dedicated-datacenter-proxies/enterprise/proxy-lists.md).

#### Dedicated Datacenter Proxies (Self-service)

**Available protocols:** `HTTP`, `HTTPS`, `SOCKS5`

**Host/IP:** `ddc.oxylabs.io`

**Port:** `8001`

<figure><img src="/files/xcfixGnlygiNMrkwnoxC" alt="" width="563"><figcaption></figcaption></figure>

For Self-Service Dedicated Datacenter Proxies (purchased via Oxylabs dashboard), the port indicates the sequential number of an IP address from the acquired [proxy list](/products/proxies/datacenter-proxies/proxy-list.md). If you want to get a different IP with each request, change the **Port** to `8000` to enable [proxy rotation](/products/proxies/dedicated-datacenter-proxies/self-service/proxy-rotation.md).

#### ISP Proxies

**Available protocols:** `HTTP`, `HTTPS`, `SOCKS5`

**Host/IP**: `isp.oxylabs.io`

**Port**: `8001`

<figure><img src="/files/xkvsZBWmjj7RmeDsKb2h" alt="" width="563"><figcaption></figcaption></figure>

ISP Proxies assign each port to a specific IP address and location. Port `8001` always uses the first IP from your [proxy list](/products/proxies/isp-proxies/proxy-list.md). Use port `8000` to enable [proxy rotation](/products/proxies/isp-proxies/proxy-rotation.md).

To get rotating IPs from a specific country's proxy pool, set the username using this format: `user-USERNAME-country-XX`, where `XX` is the country code (e.g., `US` for United States).

#### Dedicated ISP Proxies

**Available protocols:** `HTTP`, `HTTPS`, `SOCKS5`

**Host/IP**: `disp.oxylabs.io`

**Port**: `8001`

<figure><img src="/files/aeYSIZrPsLEy2x7smD7p" alt="" width="563"><figcaption></figcaption></figure>

You will need to choose the port assigned to an IP address from the purchased [proxy list](/products/proxies/dedicated-isp-proxies/self-service/proxy-list.md), which you can find on the Oxylabs dashboard. The `8001` port will pick the first IP address from your list for all requests. Use port `8000` for automatic [proxy IP rotation](/products/proxies/dedicated-isp-proxies/self-service/proxy-rotation.md).

### **Step 5**

Close the Network Proxy window. The changes will automatically be saved, and the system-wide proxy will be activated.&#x20;

Each time you make a web request through a browser or other application, a **pop-up window will prompt you to enter the credentials** of your Oxylabs proxy user for the session. Enter corresponding proxy credentials (created via [Oxylabs dashboard](https://dashboard.oxylabs.io)):

| Proxy type                                  | Example                                                                                                                  |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Residential & Mobile proxies                | <p><strong>User Name:</strong> <code>customer-USERNAME</code></p><p><strong>Password:</strong> <code>PASSWORD</code></p> |
| Datacenter proxies                          | <p><strong>User Name:</strong> <code>user-USERNAME</code></p><p><strong>Password:</strong> <code>PASSWORD</code></p>     |
| Dedicated Datacenter proxies (Enterprise)   | <p><strong>User Name:</strong> <code>USERNAME</code></p><p><strong>Password:</strong> <code>PASSWORD</code></p>          |
| Dedicated Datacenter proxies (Self-service) | <p><strong>User Name:</strong> <code>user-USERNAME</code></p><p><strong>Password:</strong> <code>PASSWORD</code></p>     |
| ISP proxies                                 | <p><strong>User Name:</strong> <code>user-USERNAME</code></p><p><strong>Password:</strong> <code>PASSWORD</code></p>     |
| Dedicated ISP proxies                       | <p><strong>User Name:</strong> <code>user-USERNAME</code></p><p><strong>Password:</strong> <code>PASSWORD</code></p>     |

{% hint style="warning" %}
Make sure to add the `customer-` or `user-` prefix to your username if your proxy type requires it.
{% endhint %}

## Method 2: Terminal sessions

To set up a network proxy for all terminal sessions, follow the steps below:

### **Step 1**

[**Download**](https://ubuntu.com/download/desktop) and install Ubuntu Desktop.

### **Step 2**

Open **shell** configuration using an editor. For the ZSH terminal, the shell configuration file is by default located in the home directory. We can edit this file using `vim` with the below command:

```sh
vim ~/.zshrc
```

Instead of `vim`, you can also use `gedit`, `nano`, or any other text editor that you prefer. Also, if you are using Bash instead of ZSH, you’ll have to edit your bash shell configuration file, i.e. `~/.bashrc` instead of `~/.zshrc`.

### **Step 3**

Create new environment variables. At the bottom of this configuration file, you’ll have to define the `http_proxy,` `https_proxy`, or `ALL_PROXY` (for SOCKS5) variables.

```sh
export http_proxy="username:password@host:port"
export https_proxy="username:password@host:port"
export ALL_PROXY="socks5://username:password@host:port"
```

Then adjust the details for your chosen proxy type:

* [Residential & Mobile Proxies](#residential-and-mobile-proxies-1)
* [Datacenter Proxies](#datacenter-proxies-1)
* [Dedicated Datacenter Proxies (Enterprise)](#dedicated-datacenter-proxies-enterprise-1)
* [Dedicated Datacenter Proxies (Self-service)](#dedicated-datacenter-proxies-self-service-1)
* [ISP Proxies](#isp-proxies)
* [Dedicated ISP Proxies](#dedicated-isp-proxies-1)

#### Residential & Mobile Proxies

**Host:** `pr.oxylabs.io`

**Port:** `7777`

**Username:** `customer-username`

**Password:** `password`

{% hint style="warning" %}
Don't forget to add the `customer-` part to your username.
{% endhint %}

You may also use **additional parameters** with residential and mobile proxies to set the geo-location (country, state, city, and etc.) and control sessions. Check out the [Residential Proxies documentation](/products/proxies/residential-proxies.md) to learn more.

#### Datacenter Proxies

**Host:** `dc.oxylabs.io`

**Port:** `8001`

**Username:** `user-username`

**Password:** `password`

{% hint style="warning" %}
Don't forget to add the `user-` part to your username.
{% endhint %}

{% tabs %}
{% tab title="Pay-per-IP subscription" %}
The port is the sequential number assigned to an IP address from the [proxy list](/products/proxies/datacenter-proxies/proxy-list.md). Thus, port `8001` uses the first IP address from your list. You may also enable [proxy IP rotation](/products/proxies/datacenter-proxies/ip-control.md) by setting the port to `8000`.

Furthermore, you can specify the [geo-location](/products/proxies/datacenter-proxies/select-country.md), for example, the US, by setting the **Proxy username** to `user-USERNAME-country-US`.
{% endtab %}

{% tab title="Pay-per-traffic subscription" %}
The port `8001` picks a random IP address but stays consistent during a session. Alternatively, you can [rotate proxy IPs](/products/proxies/datacenter-proxies/ip-control.md) with each request by using port `8000`.

If you want to use a specific [geo-location](/products/proxies/datacenter-proxies/select-country.md), for example, the US, set the Proxy username to `user-USERNAME-country-US`.
{% endtab %}
{% endtabs %}

#### Dedicated Datacenter Proxies (Enterprise)

**Host:**  `1.2.3.4` (IP address from your [proxy list](/products/proxies/dedicated-datacenter-proxies/enterprise/proxy-lists.md))

**Port:** `60000` (HTTP), `1180` (SOCKS5)

**Username:** `username`

**Password:** `password`

For Enterprise Dedicated Datacenter Proxies (purchased via sales), you’ll have to choose an IP address from the acquired [proxy list](/products/proxies/dedicated-datacenter-proxies/enterprise/proxy-lists.md).

#### Dedicated Datacenter Proxies (Self-service)

**Host:** `ddc.oxylabs.io`

**Port:** `8001`

**Username:** `user-username`

**Password:** `password`

{% hint style="warning" %}
Don't forget to add the `user-` part to your username.
{% endhint %}

For Self-Service Dedicated Datacenter Proxies (purchased via Oxylabs dashboard), the port indicates the sequential number of an IP address from the acquired [proxy list](/products/proxies/datacenter-proxies/proxy-list.md). If you want to get a different IP with each request, change the **Port** to `8000` to enable [proxy rotation](/products/proxies/dedicated-datacenter-proxies/self-service/proxy-rotation.md).

#### ISP Proxies

**Host:** `isp.oxylabs.io`

**Port:** `8001`

**Username:** `user-username`

**Password:** `password`

{% hint style="warning" %}
Don't forget to add the `user-` part to your username.
{% endhint %}

ISP Proxies assign each port to a specific IP address and location. Port `8001` always uses the first IP from your [proxy list](/products/proxies/isp-proxies/proxy-list.md). Use port `8000` to enable [proxy rotation](/products/proxies/isp-proxies/proxy-rotation.md).&#x20;

To get rotating IPs from a specific country's proxy pool, set the username using this format: `user-USERNAME-country-XX`, where `XX` is the country code (e.g., `US` for United States).

#### Dedicated ISP Proxies

**Host:** `disp.oxylabs.io`

**Port:** `8001`

**Username:** `user-username`

**Password:** `password`

{% hint style="warning" %}
Don't forget to add the `user-` part to your username.
{% endhint %}

You will need to choose the port assigned to an IP address from the purchased [proxy list](/products/proxies/dedicated-isp-proxies/self-service/proxy-list.md), which you can find on the Oxylabs dashboard. The `8001` port will pick the first IP address from your list for all requests. Use port `8000` for automatic [proxy IP rotation](/products/proxies/dedicated-isp-proxies/self-service/proxy-rotation.md).

### **Step 4**

Reload the configuration file either by opening a new terminal or by running the following command in the existing terminal:

```sh
source ~/.zshrc
```

The proxy will always be active for the current user.  The shell configuration file gets loaded every time you open a new terminal. So, the environment variables will be always available for you even if you restart your computer.

If you want to enable it for all users then you will have to append the above two lines in the `/etc/environment`.

That’s all! You’ve successfully integrated your Oxylabs proxies.&#x20;

You can find the complete tutorial [here](https://oxylabs.io/resources/integrations/ubuntu).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/integrations/proxy-integrations/ubuntu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
