在 Ubuntu Server 中更改终端颜色

Jos*_*h K 7 ubuntu ssh terminal color

我想改变颜色。淡蓝色文件名上突出的柠檬绿让我眼睛都睁不开了。

我不确定我是否正在使用xtermgnome其他什么,但我想更改默认配色方案(最好是对我的角膜不那么冒犯的东西)并保持更改(更新我的用户配置文件)。

颜色很好,但有时会使文本不可读。如果我不能有漂亮的颜色,我会满足于没有颜色,标准的黑白。

Dav*_*man 8

您需要LS_COLORS在您的~/.dir_colors(系统范围内/etc/dir_colors)中配置您的导出

有关文档,请参见此处:http : //manpages.ubuntu.com/manpages/karmic/man5/dir_colors.5.html

::编辑::

让它坚持:

  1. 将此附加到您的 ~/.bashrc
    if [ "$TERM" != "dumb" ]; 然后
      [ -e "$HOME/.dir_colors" ] && 
      DIR_COLORS="$HOME/.dir_colors" [ -e "$DIR_COLORS" ] ||
      DIR_COLORS="" 
      eval "`dircolors -b $DIR_COLORS`" 
      别名 ls='ls --color=auto'
    菲
  1. 创建/编辑您的~/.dir_colors,

    例如与 dircolors --print-database > .dir_colors

  2. 然后使用以下命令强制读取 .bashrc 文件:

    $: source ~/.bashrc

  3. 一切都应该很漂亮。