1.打开.bashrc文件

vim ~/.bashrc

1 # .bashrc
2 alias rm=’rm -i’
3 alias cp=’cp -i’
4 alias mv=’mv -i’
5 alias xsymakeptmcu=’./maketest process all fege_smfs smfs app’
6 alias xsymakeptp1010=’./maketest process all fege p1010 app’
7 alias xsy=’cd /home/gr5user/xiesenyi/’
8 alias dhy=’cd /data/gr5user/donghy/’
9 alias m6120c1=’make libjobvirfegearm64leapp/arm64le REL=1 -j64′
10 alias m6120c2=’make virfegearm64leapp/arm64le REL=1 -j64′
11 alias xsymakefcm=’ make libjobfcm_css_zte_060/arm64le REL=1 -j128′
12 alias xsyfcm=”make fcm060/arm64le REL=1 | grep FCM | awk ‘{print $2}’ | xargs -i cp -f {} ~/xiesenyi/ftp/”
13 alias dirs=’dirs -v’
14 alias pmzjxclone=’~/zhaojianxiang/scripts/gitcloneV5branch.sh 10244090′
15 alias cxlcheck=’~/chenxinglin/scps/git61v5r2Ex.sh’
16 alias supzjxclone=’~/zhaojianxiang/scripts/gitcloneV5R1_SUP.sh 10244090 SPN’
17 alias _makefcm=’make libjobfcm_css_zte/arm64le REL=1′
18 alias cmxalke=’make fege_mcuapp/smfs/oixg4t REL=1′
19 alias cxlpush=’git push origin HEAD:refs/for/TEAM5%r=yin.zuoting@zte.com.cn,r=lan.xuchang@zte.com.cn’
20 alias cclone=’~/chenxinglin/scps/gitcloneV5R1_SUP.sh 10244059′
21 alias cxlps=’git push origin HEAD:refs/for/TEAM5%r=chen.xinglin@zte.com.cn’
22 alias cgetpwd=’python ~/chenxinglin/scps/b11.py’
23 alias cxchdir=’python ~/chenxinglin/scps/b12.py’
24 alias cmset=’python ~/chenxinglin/scps/b13.py’
25 alias cmfege=’make libjobfegeapp/armam335x REL=1′
26 alias cnfege=’make fegeapp/armam335x REL=1′
27 alias m6190=’./makeversion.sh pkg 6190HV5R2 rel’
28 cworkd=”/data/gr5user/chenxinglin/daily/ZXCTN61V5R1_SUP/code/ptn/linecard”
29 cmaked=”/data/gr5user/chenxinglin/daily/ZXCTN61V5R1_SUP/product/6100/make”
30 alias cm6120=”make libjobvirfegearmqoriqapp/armqoriq REL=1″
31 alias cm6121=”make virfegearmqoriqapp/armqoriq REL=1″
32 alias cpushb18=”git push origin HEAD:refs/for/int_V5.00.10B18%r=yin.zuoting@zte.com.cn”
33 export PATH=”$PATH:/usr/local/bin/:/data/gr5user/xiesenyi/script/”
34 export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH:/usr/local/lib”
35 export PKG_CONFIG_PATH=”$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig”
36 #Source global definitions
37 if [ -f /etc/bashrc ]; then
38 . /etc/bashrc
39 fi
40 #add by xsy
41 function md {
42 mkdir $@ && cd $1
43 }
44 IP=$(ifconfig enp48s0f0 | grep -E ‘inet[^6]’ | awk ‘{ print $2}’)
45 #PS1='[[e[32;40m]u[e[31;40m]@[e[33;40m]${IP}:w][e[0;0m]$’
46 PS1='[u@${IP}:W]]]e[31;30m]]$[e[0;0m]:’
47 #end

alias别名,简化命令符

PS1='[u@${IP}:W]]]e[31;30m]]$[e[0;0m]:’    ——大写W自动缩减命令符,小写w显示全部命令符

【参考】

1. https://blog.csdn.net/Bloddy/article/details/81638953