为linux命令起别名

使别名永久生效(#定制专属命令~#)

  • 编辑~/.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
上一篇:SpringMVC入门篇


下一篇:ASP.NET MVC 壹:浏览器选择文件并上传到服务器