美文网首页Linux
zsh alias 永久生效

zsh alias 永久生效

作者: 徐子鑑 | 来源:发表于2017-10-27 21:05 被阅读164次

Zsh的配置文件位于~/.zshrc。

vi ~/.zshrc

从文件末尾开始添加配置。首先,我们可以根据自己的喜好,添加一些别名例如:

alias ll='ls -al'
alias la='ls -a'
alias apt-get='sudo apt-get'
alias gita='git add'
alias gitc='git commit'

再添加一句

source ~/.bash_profile

这样就可以”继承”.bash_profile的配置了。执行

source ~/.zshrc

让配置生效,重新使用,一切OK!

相关文章

网友评论

    本文标题:zsh alias 永久生效

    本文链接:https://www.haomeiwen.com/subject/hhidpxtx.html