Linux用户alias文件配置

修改 ~/.bashrc 文件,以配置用户本身定义的alia bash

$> 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语句 this

echo "My alias has started successfully!"
echo "Type 'alias' to see more about this!"

# my
alias la='ls -al --color=auto'
# my-end

此次更改须要在下次登陆时生效。 spa

若要当即生效,输入: code

$> source ~/.bashrc
相关文章
相关标签/搜索