(1)[root@tf ~]# alias rm='echo do not use rm command'
[root@tf ~]# vim /etc/profile  
alias rm='echo do not use rm command'
[root@tf ~]# source /etc/profile

(2)[root@tf ~]# vim /root/.bashrc
# .bashrc

# 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

相关文章:

  • 2022-02-24
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-09-23
  • 2021-09-20
  • 2022-03-10
猜你喜欢
  • 2021-11-16
  • 2021-07-03
相关资源
相似解决方案