Set System Locale2024/01/22 |
If you would like to change the System Locale, set like follows. |
|
[1] | Set locale with login class. |
root@dlp:~ #
vi /etc/login.conf # add to last line # replace to your own language below japanese|Japanese Users Accounts:\ :charset=UTF-8:\ :lang=ja_JP.UTF-8:\ :tc=default # update database root@dlp:~ # cap_mkdb /etc/login.conf
# apply the defined class to a new user root@dlp:~ # pw useradd serverworld -m -L japanese
# apply the defined class to an existing user root@dlp:~ # pw usermod freebsd -L japanese
|
[2] | Set locale in Shell startup file. |
# apply to the system wide # * if a user applies by itself, write them below in [~/.profile] root@dlp:~ # vi /etc/profile # add to last line # replace to your own language below export LANG=ja_JP.UTF-8 export MM_CHARSET=UTF-8 # apply to the system wide # * if a user applies by itself, write them below in [~/.login] root@dlp:~ # vi /etc/csh.login
setenv LANG ja_JP.UTF-8
setenv MM_CHARSET UTF-8 |