LoginSignup
0
0

More than 5 years have passed since last update.

v20171105 の Fedora 27 (cloud-base) Vagrant box に日本語ロケールを追加する方法

Posted at

https://qiita.com/ryo-sato/items/00dea41bf665626c9b43 の二番煎じ。

vagrant up 直後

[vagrant@localhost ~]$ localectl list-locales | grep -i ja
[vagrant@localhost ~]$

日本語ロケールが無い。。。

glibc-langpack-ja インストール

[vagrant@localhost ~]$ sudo dnf -y install glibc-langpack-ja
(省略)
[vagrant@localhost ~]$
[vagrant@localhost ~]$ localectl list-locales | grep -i ja
ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc
[vagrant@localhost ~]$

大丈夫っぽい。

ロケール設定

[vagrant@localhost ~]$ sudo localectl set-locale LANG=ja_JP.UTF-8
[vagrant@localhost ~]$ sudo localectl set-keymap jp106
[vagrant@localhost ~]$ sudo localectl set-keymap jp-OADG109A
[vagrant@localhost ~]$ localectl status
   System Locale: LANG=ja_JP.UTF-8
       VC Keymap: jp-OADG109A
      X11 Layout: jp
       X11 Model: jp106
     X11 Options: terminate:ctrl_alt_bksp
[vagrant@localhost ~]$

ここでログインし直し。

[vagrant@localhost ~]$ echo $LANG
ja_JP.UTF-8
[vagrant@localhost ~]$ ls -lA
total 20
-rw-------. 1 vagrant vagrant  262  2月 16 06:57 .bash_history
-rw-r--r--. 1 vagrant vagrant   18 10月 30 14:05 .bash_logout
-rw-r--r--. 1 vagrant vagrant  193 10月 30 14:05 .bash_profile
-rw-r--r--. 1 vagrant vagrant  231 10月 30 14:05 .bashrc
drwx------. 2 vagrant vagrant 4096  2月 16 06:52 .ssh
[vagrant@localhost ~]$

大丈夫っぽい。(2 回目)

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