服务器系统 : Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-30-generic x86_64)
输入命令 : dircolors -p > /root/.dircolors
输入命令 : vim /root/.dircolors
修改以下东西: NORMAL 01;36 # global default, although everything should be something. FILE 00;37 # normal file DIR 00;33 # directory LINK 03;36 # symbolic link
#下面可以不设置 FIFO 40;33 # pipe SOCK 01;35 # socket DOOR 01;35 # door BLK 40;33;01 # block device driver CHR 40;33;01 # character device driver ORPHAN 41;33;01 # symlink to nonexistent file MISSING 01;05;37;41 # ... and the files they point to
存盘,退出vim编辑器
输入命令 : vim /etc/profile
添加 export TERM=xterm-color
输入命令 : mv /root/.bashrc /root/.bashrc.bak (做备份)
输入命令 : vim /root/.bashrc
添加下面:
PS1='\n\033[0;33m[\u@\h]\033[0m \033[0;31m\w\033[0m \n\[\e[40;92;01m\]\$ '
shopt -s histappend HISTSIZE=1000 HISTFILESIZE=2000 shopt -s checkwinsize
# You may uncomment the following lines if you want `ls' to be colorized: export LS_OPTIONS='--color=always' eval "`dircolors /root/.dircolors`" alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias l='ls $LS_OPTIONS -lA' alias grep='GREP_COLOR="1;33;40" LANG=C grep --color=always'
# enable color support of ls and also add handy aliases if [ "$TERM" != "dumb" ]; then eval "`dircolors -b /root/.dircolors`" alias ls='ls --color=auto' alias dir='ls --color=auto --format=vertical' alias vdir='ls --color=auto --format=long' fi
保存,退出vim编辑
#source /root/.bashrc
这样就完成了 恭喜你
|