29
12

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.

Ubuntu 16.04 のCUIでの文字化け♦♦を直すメモ

Last updated at Posted at 2019-03-19

Ubuntuをインストールした際,言語を日本語にしたので,
CUI(Ctrl+Alt+F1)画面でエラー吐かれても♦♦♦♦ばかりで読めない。

ログインループに悩まされていたのでとても困った。

##文字化けを直す方法

.bashrcというファイルに,設定を書くことで解決。

.bashrcを開く
vi ~/.bashrc

文末まで移動して,以下の文を入力する。

入力
case $TERM in
      linux) LANG=C ;;
      *)       LANG=ja_JP.UTF-8;;
esac

入力したら,CUIの画面の場合はESCを押すと入力終了になるらしい?
(ならなかった…:pensive:再起動した)。
読めるようになった!

もし入力終了になったら,以下を入力すると反映されるらしい

反映
source ~/.bashrc
29
12
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
29
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?