执行命令使别名生效
1.介绍
执行命令使别名生效
2.步骤
2.1 修改/root/.bashrc文件
vi /root/.bashrc
2.2 修改内容格式(alias 别名 = '命令格式')
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
2.3使修改的别名生效
source /root/.bashrc