2014年11月12日水曜日

ubuntu lsの色設定

VMwarePlayerでubuntu14.10をインストールしたが、
lsコマンドの色設定でディレクトリが見づらいので、設定を変更する。

/usr/bin/dircolorsという実行ファイルにオプション -pをつけてdircolorsの設定ファイルを出力させる。
出力ファイルを編集して、再起動する。
dircolorsの初期設定だとOK。

1. dircolors -p > ~/.dircolors
2. sudo vi ~/.dircolors

~/.bashrcに以下の記述があるため、再起動すると上記で作成、編集した設定ファイルが適用される。

#enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
...
fi

0 件のコメント:

コメントを投稿