OSX 的 iTerm2中显示中文文件系统

在iTerm2中需要正确的显示中文文件目录和文件名需要对iTerm2进行以下设置: iTerm2 Preference——Profiles——Terminal 修改其中的文字编码为utf-8 然后在使用ls时加上 -v 参数,作用是: -v      Force unedited printing of non-graphic characters; this is the default when output is not to a terminal. 这样中文字就能以UTF-8编码正确的显示了。 修改一下文件就可以输入中文了: ~/.inputrc中添加: set convert-meta off set meta-flag on set output-meta on