讓 FreeBSD 的終端機也多彩多姿

使用習慣 Linux 的 bash,有些不太習慣 FreeBSD 的 csh。
# echo $SHELL
/bin/csh

更改方式
1. 安裝 bash
# pkg install bash[@more@]2. 更改使用者使用的 shell
# chsh
#Changing user information for root.
Login: root
Password:
Uid [#]: 0
Gid [# or name]: 0
Change [month day year]:
Expire [month day year]:
Class:
Home directory: /root
Shell: /bin/csh
Full Name: Charlie &
Office Location:
Office Phone:
Home Phone:
Other information:

Shell: /bin/csh
改成
Shell: /usr/local/bin/bash

3. 安裝 gnuls
# pkg install gnuls

4. 修改 /etc/profile 設定檔
# vi /etc/profile
加入下面一行
alias ls=”gnuls –color=auto –show-control-chars -F”


alias ls=”ls -xCFG”

二個在顏色的效果上有一點小差異(個人比較習慣使用上一個)!

存檔後,重新執行
# source /etc/profile 或重新登出登入即可生效

5. 原本的畫面

修改之後的畫面