您的位置:首页 > 运维架构 > Linux

Linux用户alias文件配置

2011-10-08 23:40 211 查看
修改 ~/.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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: