*`Updated: 2023/07/22`* --- PPPoE設定、網路設定故障排除、關閉與啟動GUI --- ## PPPoE設定 1. 安裝pppoeconf ```bash=Ubuntu sudo apt-get install pppoeconf ``` 2. 使用Terminal進行設定 ```bash=Ubuntu sudo pppoeconf ``` ## code-server設定 ### code-server安裝 1. 執行安裝腳本 ```bash=Ubuntu curl -fsSL https://code-server.dev/install.sh | sh ``` 2. 於`.config/code-server/config.yaml`中修改密碼 3. 設定開機啟動 ```bash=Ubuntu sudo systemctl enable --now code-server@$USER ``` 4. 安裝Nginx ```bash=Ubuntu sudo apt install -y nginx certbot python3-certbot-nginx ``` 5. 於`/etc/nginx/sites-available/code-server`中加入下列文字 ``` server { listen 80; listen [::]:80; server_name mydomain.com; location / { proxy_pass http://localhost:8080/; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; proxy_set_header Accept-Encoding gzip; } } ``` 6. 產生連結 ``` sudo ln -s /etc/nginx/sites-available/code-server /etc/nginx/sites-enabled/code-server ``` ### code-server服務選項 ```bash=Ubuntu sudo systemctl status code-server@$USER ``` ### 啟用nginx ```bash=Ubuntu sudo certbot --non-interactive --redirect --agree-tos --nginx -d cocobird.net -m cocobird231@gmail.com ``` ## 故障排除 ### 遇到 "No wired connection - Wired unmanaged" 參照[此篇](https://askubuntu.com/questions/1039233/no-wired-connection-wired-unmanaged-ubuntu-18-04)說明 1. 更改`/etc/NetworkManager/NetworkManager.conf`中的`managed`設定為`true` 2. 重新啟動服務 ```bash=Ubuntu sudo systemctl restart network-manager ``` ### 遇到pppoe斷線問題 1. 停止pppoe連線 ```bash=Ubuntu sudo poff -a ``` 2. 手動撥接 ```bash=Ubuntu cd /etc/ppp/peers pon dsl-provider ``` ## GUI設定 ### 關閉GUI ```bash=Ubuntu sudo systemctl set-default multi-user gnome-session-quit ``` - 重新開機時按下`ctrl`+`alt`+`F1`進入登入程序 ### 啟動GUI ```bash=Ubuntu sudo systemctl set-default graphical sudo systemctl start gdm3 ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up