杂项
history格式
编辑/etc/profile
vi /etc/profile
添加以下内容
#获取登录IP
IP=`who -u am i | awk '{print $NF}' | sed -e 's/[()]//g'`
#设置history格式
export HISTTIMEFORMAT="$IP `whoami` %Y-%m-%d %H:%M:%S "
shell终端提示符
编辑~/.bashrc
vi ~/.bashrc
添加以下内容
# Command line colors
PS1='\e[32;1m[\e[36m\u\e[31m@\e[35m\H \e[33m\t \e[34m\W\e[32m]\e[36m\$\e[0m'