0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SSH環境下のCentOSで文字化けした場合の対処法

Posted at

状態

ユニコード文字がエスケープされている

やったこと

状態確認

$ localectl status

System Locale: LANG=ja_JP.utf8
VC Keymap: us
X11 Layout: n/a

Keymapを修正

$ localectl set-keymap jp106

再度確認

$ localectl status
   System Locale: LANG=ja_JP.utf8
       VC Keymap: jp106
      X11 Layout: jp
       X11 Model: jp106
     X11 Options: terminate:ctrl_alt_bksp

日本語のlocaleが使用可能か確認

$ localectl list-locales | grep -i ja

そもそもなかったので追加

$ localedef -f UTF-8 -i ja_JP ja_JP

再度確認

$ localectl list-locales | grep -i ja

ja_JP
ja_JP.utf8

これで文字化けしなくなりました。

備考

タイムゾーンは参考元と微妙に違う(多分大丈夫?)

$ timedatectl status

      Local time: 木 2018-05-31 15:36:42 JST
  Universal time: 木 2018-05-31 06:36:42 UTC
        RTC time: 木 2018-05-31 06:36:41
       Time zone: Asia/Tokyo (JST, +0900)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?