当前位置: 移动技术网 > 科技>操作系统>Linux > Linux用户alias文件配置方法

Linux用户alias文件配置方法

2018年03月24日  | 移动技术网科技  | 我要评论

修改 ~/.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

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网