Skip to content
View in the app

A better way to browse. Learn more.

PHP论坛人

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

解決SSH中文亂碼與中文語系安裝

Featured Replies

------------------------------------
解決SSH中文亂碼與中文語系安裝
------------------------------------

在使用SSH連線至Debian伺服器時,若出現以下問題:

中文顯示為亂碼或問號

應用程式無法正確顯示地區資訊

系統訊息出現編碼錯誤

這些問題通常是因為系統缺少對應的語系 (locale) 支援所致





安裝與配置語系

apt update -y


apt install locales -y





重新配置語系工具

dpkg-reconfigure locales





介面操作步驟

選取語系:使用方向鍵瀏覽,按下 空白鍵 選取 (* 表示選取)

1.png

建議選單:除預設的 en_US.UTF-8 外,建議加選以下選項以確保相容性

[*] zh_CN.UTF-8 UTF-8

[*] zh_HK.UTF-8 UTF-8

[*] zh_SG.UTF-8 UTF-8

[*] zh_TW.UTF-8 UTF-8

2.png

確認:按Tab鍵移動到 <OK>,按下Enter

--------------------

設定系統預設語系

--------------------

在 Default locale for the system environment:

建議選擇 en_US.UTF-8 英文介面語系,然後按Enter完成

避免大量改為中文介面後,反而不適應

3.png

---------
套用
---------


立即套用
source /etc/default/locale


設定完成後,必須重新載入設定檔或重新登入SSH才會生效

------------------
字型套件
------------------

若仍有亂碼,請檢查SSH客戶端的編碼設定 (通常需設為 UTF-8)


未重新登入,請完全登出SSH連線,再重新登入


部分應用程式可能需要額外安裝字型套件,這能確保中文顯示完整,不會出現方框或缺字

apt install -y fonts-noto-cjk

Edited by Jack

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.