cgywin中文化

Cygwin 中文化

目前網路上找的的 Cygwin 中文化說明對於新版的 Cygwin 似乎不甚正確,害我之前試了半天都失敗。這次在安裝 Cygwin 時,其 Cygwin DLL 的版號是 1.5.10-1 ,如果一直無法讓 Cygwin 顯示中文字的話,也許可以照以下方式試試看。
初始化 Cygwin

當第一次執行 cygwin 時,多半會出現以下的訊息要求建立使用者:

Your group is currently "mkpasswd". This indicates that
the /etc/passwd (and possibly /etc/group) files should be rebuilt.
See the man pages for mkpasswd and mkgroup then, for example, run
mkpasswd -l [-d] > /etc/passwd
mkgroup -l [-d] > /etc/group
Note that the -d switch is necessary for domain users.

此時使用以下指令完成使用者建置動作:

mkpasswd -l > /etc/passwd
mkgroup -l > /etc/group

* 若使用者有加入網域中,則要加上 -d 選項,如下例:

mkpasswd -l -d > /etc/passwd
mkgroup -l -d > /etc/group

完成上述指令後,請先離開 Cygwin 環境再重新進入,此時應該會看到 Cygwin 開始建立使用者的基本設定檔:

Copying skeleton files.
These files are for the user to personalise
their cygwin experience.

These will never be overwritten.

`./.bashrc' -> `/home/bill//.bashrc' `./.bash_profile' -> `/home/bill//.bash_profile' `./.inputrc' -> `/home/bill//.inputrc'
完成中文化相關設定

當完成上述設定後,Cygwin 才會建立使用者的基本設定,此時才能依照網路上所找到的方式完成 Cygwin 中文化設定。

1. 編輯 ~/.inputrc ,加入以下設定:

set meta-flag on
set input-meta on
set convert-meta off
set output-meta on

2. 編輯 ~/.bash_profile ,加入以下設定:

alias ls='ls --show-control-chars'
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值