修改 ~/.bashrc 文件,以配置用户自己定义的alias
$> vi ~/.bashrc
显示
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH
在文件最后,添加自定义的alias语句
echo "My alias has started successfully!" echo "Type 'alias' to see more about this!" # my alias la='ls -al --color=auto' # my-end
这次更改需要在下次登录时生效。
若要立即生效,输入:
$> source ~/.bashrc
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)