First switch to the root user via the SU command
Check what the current character set is and implement it through the Echo $LANG
Of course, you can also check your system's files with the cat command:/etc/sysconfig/i18n
But I think it is very strange, centos7 above this file, and then an analysis, the original is 7 version put Lang into another file:/etc/locale.conf, everyone notice
Of course, in modifying the configuration file, to develop a good habit, that is, backup.
Back up with the CP command:
Cp/etc/locale.conf/etc/locale.conf.ori
Then write the things we need with the echo command:
Echo ' lang=en ' >/etc/locale.conf
Check with cat command:
Cat/etc/locale.conf
The discovery file has been modified.
But through the Echo $LANG check for real-time status Discovery or Chinese, why?
In fact, there is no writing to the execution of things, often we can through the source or. command to execute the modified file (can be understood as a function of the update)
Note that the. is also the command, to follow the following/keep a space, so as not to error.
Check again, Echo $LANG and find out what we want.
Mutual encouragement, beginning of spring.
How to adjust the character set to Chinese in Linux