Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:einrichtung [2024/06/30 13:29] – [Netwerk] swe | linux:einrichtung [2025/12/20 14:53] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | # Einrichtung |
| - | ===== Netwerk ===== | + | |
| - | Der kürzeste und schnellste Weg, Netzwerkeinstellungen vorzunehmen, | + | ## Netzwerk |
| - | Die Datei ''/ | + | Der kürzeste und schnellste Weg, Netzwerkeinstellungen vorzunehmen, |
| + | wie immer über die Konsole. | ||
| - | ==== Proxy ==== | + | Die Datei `/ |
| - | Füge die folgenden Zeilen hinzu. Und ja: Die Variablen | + | systemweite |
| + | werden. Diese Datei wird modifiziert. | ||
| - | < | + | [Environment |
| + | Variablen](https:// | ||
| + | |||
| + | ### Proxy | ||
| + | |||
| + | Füge die folgenden Zeilen hinzu. Und ja: Die Variablen müssen doppelt | ||
| + | geschrieben werden, da einige Programme nach den Variablennamen in | ||
| + | Großbuchstaben, | ||
| + | |||
| + | ``` | ||
| http_proxy=http:// | http_proxy=http:// | ||
| https_proxy=http:// | https_proxy=http:// | ||
| Line 19: | Line 29: | ||
| FTP_PROXY=http:// | FTP_PROXY=http:// | ||
| NO_PROXY=" | NO_PROXY=" | ||
| - | </ | + | ``` |
| - | + | ||
| - | ==== apt ==== | + | |
| - | Leider lesen diese Programme die Umgebungsvariablen auch nicht aus, so dass wir diese auf eine andere Weise bekannt machen müssen. | + | |
| - | + | ||
| - | In '' | + | |
| - | Acquire:: | + | |
| - | Acquire:: | + | |
| - | Acquire:: | + | |
| - | <WRAP center round important 100%> | + | |
| - | Achte hierbei genau auf die doppelten Doppelpunkte und Semikolon am Ende jeder Zeile. | + | |
| - | </ | + | |
| - | + | ||
| - | === Script zum Ein- und Ausschalten der Proxies === | + | |
| - | !!! Nur für Fortgeschrittene !!! [[Linux: | + | |
| - | <code | download> | + | ``` |
| - | #!/usr/bin/env bash | + | export http_proxy=http: |
| + | export https_proxy=http:// | ||
| + | export ftp_proxy=http:// | ||
| + | export no_proxy=" | ||
| - | # gsettings list-recursively org.gnome.system.proxy | + | export HTTP_PROXY=http:// |
| + | export HTTPS_PROXY=http:// | ||
| + | export FTP_PROXY=http:// | ||
| + | export NO_PROXY=" | ||
| + | ``` | ||
| - | # Change de ip address and port number accordingly. | + | ### apt |
| - | function myProxyOn() { | + | |
| - | gsettings set org.gnome.system.proxy mode ' | + | |
| - | gsettings set org.gnome.system.proxy.http host ' | + | |
| - | gsettings set org.gnome.system.proxy.http port 8080 | + | |
| - | gsettings set org.gnome.system.proxy.https host ' | + | |
| - | gsettings set org.gnome.system.proxy.https port 8080 | + | |
| - | gsettings set org.gnome.system.proxy.ftp host ' | + | |
| - | gsettings set org.gnome.system.proxy.ftp port 8080 | + | |
| - | echo " | + | Leider lesen diese Programme die Umgebungsvariablen auch nicht aus, so |
| - | } | + | dass wir diese auf eine andere Weise bekannt machen müssen. |
| - | function myProxyOff() { | + | In '' |
| - | gsettings set org.gnome.system.proxy mode 'none' | + | `proxy.conf` (ausprobieren) und schreibe folgende Zeilen: |
| - | echo "Proxy cofigurado para ' | + | |
| - | } | + | |
| - | function proxyOn() { # {{{ | + | Acquire::http::proxy " |
| - | #echo -n ' | + | |
| - | #read -e username | + | |
| - | #echo -n ' | + | |
| - | #read -es password | + | |
| - | #echo '' | + | |
| - | echo ' | + | |
| - | #export http_proxy=" | + | |
| - | export http_proxy=" | + | |
| - | | + | |
| - | export https_proxy=" | + | |
| - | | + | |
| - | #export ftp_proxy=" | + | |
| - | export ftp_proxy=" | + | |
| - | echo ' | + | |
| - | } | + | |
| - | function proxyOff() { | + | \<WRAP center round important 100%\> Achte hierbei genau auf die |
| - | unset HTTP_PROXY | + | doppelten Doppelpunkte und Semikolon am Ende jeder Zeile. |
| - | unset http_proxy | + | |
| - | unset FTP_proxy | + | |
| - | unset ftp_proxy | + | |
| - | echo -e "\nProxy environment variables removed!" | + | |
| - | } | + | |
| - | </code> | + | |