使别名永久生效(#定制专属命令~#)
- 编辑
~/.bashrc
文件
vim ~/.bashrc
例子:
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias cls='clear'
alias hdfs='hadoop fs'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
- 使
~/.bashrc
生效
source ~/.bashrc
- Done