修改 ~/.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
如对本文有疑问, 点击进行留言回复!!
linux下文本编辑器vim的使用方法(复制、粘贴、替换、行号、撤销、多文件操作)
网友评论