最近有同學問我 Centos 方面的一些操作, 由於我已經好多年不用Centos了所以比較生疏,這些年來一直都是用Ubuntu的,不得不說Ubuntu是我用過的這么多Linux系統中操作最舒服的了,在十分好奇之下我安裝了Centos7,這樣也可以試一試新系統。安裝的時候我選擇了GNOME,桌面比較不錯,簡潔並且美觀。
上圖:
在使用 tty 的時候遇到了一個事情,那就是主文件夾下面的中文文件是亂碼:
tty 是 通過 CTRL + ALT +F2~F6 獲得的, 這與桌面系統中的終端不是一個概念, 望看到這篇博客的網友可以知道, 這點不過多解釋。
在網上查了一些資料,發現很多人上述概念也沒有搞清楚,最后發現了下面這個帖子:
http://bbs.csdn.net/topics/391832491
其中:
該回答我覺得是比較靠譜的。
該貼回答原文如下:
明確的和你說,TTY 不支持中文!
Linux kernel maintainers do not accept patches for better Unicode support on the console because the console is to be used as an emergency interface. What needs to be done is write a terminal emulator for the Linux framebuffer that undertakes the support for Unicode. Something like a 'getty' replacement. This aspect of open-source development did not receive yet much attention
大意是:linux核心機制不接受任何的unicode補丁在Console層面,因為Console是作為一種緊急接口被使用...... 而且目前開源開發組也沒有過多的關注這一點.
從這里可以得出一個結論,目前tty是給管理員緊急修復系統時所使用的界面,故而從內核層面就不支持加載unicode包;但是模擬接口比如用SSH之類的登陸,是可以支持中文的!
所以別等了。