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

# Linux

> Learn how to integrate GloryCloud's proxy on Linux.

<Note>The process of setting up a proxy on Linux may vary depending on the Linux distribution. The following instructions have been tested on **Centos 7.9** and **Ubuntu 20.04**.</Note>

In the Linux operating system, you can set up a proxy by defining environment variables. The table below lists all proxy-related environment variables.

| Environment Variables |                                    Description                                    |
| :-------------------: | :-------------------------------------------------------------------------------: |
|      http\_proxy      |                  Specify a proxy server for routing HTTP traffic.                 |
|      https\_proxy     |                  Specify a proxy server for routing HTTPS traffic                 |
|       ftp\_proxy      |                   Specify a proxy server for routing FTP traffic                  |
|       all\_proxy      |                   Specify a proxy server for routing all traffic                  |
|       no\_proxy       | Host or domain names that do not require proxies. Wildcard characters can be used |

## Proxy Settings For Current User

<Accordion title="Temporary Proxy Settings" defaultOpen>
  You can simply set up proxy settings for routing **HTTP** and **HTTPS** traffic for the current user by using the following command. Don't forget to replace **username**, **password**, **proxy\_server**, and **port** with yours.

  <CodeGroup>
    ```Shell Without Credentials theme={null}
    export {http_proxy,https_proxy}="http://<proxy_server>:<port>"
    ```

    ```Shell With Credentials theme={null}
    export {http_proxy,https_proxy}="http://<username>:<password>@<proxy_server>:<port>"
    ```

    ```Shell Example theme={null}
    export {http_proxy,https_proxy}="http://proxy.GloryCloud.com:30000"
    export {http_proxy,https_proxy}="http://customer-testUser:123456@proxy.GloryCloud.com:30000"
    ```
  </CodeGroup>

  To remove proxy settings, simply use following command:

  ```Shell Bash theme={null}
  unset {http_proxy,https_proxy}
  ```
</Accordion>

<Accordion title="Permanent Proxy Settings">
  By adding the **export** command to the **.bashrc** file, you can ensure that this command is executed every time a new non-login shell is started. By default, **.bashrc** is sourced by **.bash\_profile** to ensure that configurations in **.bashrc** are also applied to login shells.

  <CodeGroup>
    ```Shell Without Credentials theme={null}
    echo 'export {http_proxy,https_proxy}="http://<proxy_server>:<port>"' >> ~/.bashrc
    source ~/.bashrc
    ```

    ```Shell With Credentials theme={null}
    echo 'export {http_proxy,https_proxy}="http://<username>:<password>@<proxy_server>:<port>"' >> ~/.bashrc
    source ~/.bashrc
    ```

    ```Shell Example theme={null}
    echo 'export {http_proxy,https_proxy}="http://customer-testUser:123456@proxy.GloryCloud.com:30000"' >> ~/.bashrc
    source ~/.bashrc
    ```
  </CodeGroup>
</Accordion>

## Global Proxy Settings

<Warning>Global proxy settings will affect every user in the Linux operating system. Please confirm the impact and decide whether to configure them or not..</Warning>

**/etc/profile** contains system-wide environment settings and configurations that are applied to all users on the system. It will be executed for login shells and source every shell script under the **/etc/profile.d** directory.

<CodeGroup>
  ```Shell Without Credentials theme={null}
  echo 'export {http_proxy,https_proxy}="http://<proxy_server>:<port>"' >> /etc/profile.d/proxy.sh
  source /etc/profile
  ```

  ```Shell With Credentials theme={null}
  echo 'export {http_proxy,https_proxy}="http://<username>:<password>@<proxy_server>:<port>"' >> /etc/profile.d/proxy.sh
  source /etc/profile
  ```

  ```Shell Example theme={null}
  echo 'export {http_proxy,https_proxy}="http://customer-testUser:123456@proxy.GloryCloud.com:30000"' >> /etc/profile.d/proxy.sh
  source /etc/profile
  ```
</CodeGroup>
