自定义系统命令缩写|自定义系统命令缩写 分类( ubuntu 2013-...)

添加系统全局变量:
步骤1: 使用root用户登录,在家目录下修改.bash_profile文件,查看结果如下:

[root@server132 ~]# more .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
alias p='ps -ef|grep java'
alias rm='rm -i'
alias so='su - oracle'
alias sppd='/opt/jinrong/spider/bin/shutdown.sh'
alias sptm='/opt/jinrong/tomcat/bin/shutdown.sh'
alias stpd='/opt/xizang/spider/bin/startup.sh'
alias sttm='/opt/xizang/tomcat/bin/startup.sh'
alias tpd='tail -f /opt/jinrong/spider/logs/catalina.out'
alias ttm='tail -f /opt/xizang/tomcat/logs/catalina.out'


步骤2:


source ~/.bash_profile

【自定义系统命令缩写|自定义系统命令缩写 分类( ubuntu 2013-...)】
关闭当前终端,重新打开终端,执行缩写命令即可

版权声明:本文为博主原创文章,未经博主允许不得转载。
转载于:https://www.cnblogs.com/think1988/p/4628126.html

    推荐阅读