# 在 bash 中設定 Proxy server

bash 要環境的設定如下

export http\_proxy="[http://your.proxy.net:port](https://applezulab.netdpi.net/02-linux-xi-tong-cao-zuo/http:/your.proxy.net:port)" export ftp\_proxy="[http://your.proxy.net:port](https://applezulab.netdpi.net/02-linux-xi-tong-cao-zuo/http:/your.proxy.net:port)"

依 shell 環境 加在 \~/ 目錄下的 .bashrc or .cshrc

適合 sh, bash, ksh, zsh ex .

ftp\_proxy="<http://proxy.hinet.net:80/>" gopher\_proxy="<http://proxy.hinet.net:80/>" http\_proxy="<http://proxy.hinet.net:80/>" no\_proxy="aa.bb.tw" export ftp\_proxy gopher\_proxy http\_proxy no\_proxy

適合 csh, tcsh ex: setenv http\_proxy "<http://proxy.hinet.net:80/>" setenv no\_proxy "aa.bb.tw"

需要帳號密碼 $ http\_proxy="[http://username:password@host:port](https://applezulab.netdpi.net/02-linux-xi-tong-cao-zuo/http:/username:password@host:port)" $ export http\_proxy


---

# Agent Instructions: 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:

```
GET https://applezulab.netdpi.net/02-linux-xi-tong-cao-zuo/set-proxy-server-in-bash.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
