修改 ~/.bashrc 文件,以配置用戶自己定義的alias
$> vi ~/.bashrc
顯示
# .bash_profile # Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programsPATH=$PATH:$HOME/binexport PATH
在文件最后,添加自定義的alias語(yǔ)句
echo "My alias has started successfully!"echo "Type 'alias' to see more about this!"# myalias la='ls -al --color=auto'# my-end
這次更改需要在下次登錄時(shí)生效。
若要立即生效,輸入:
$> source ~/.bashrc
新聞熱點(diǎn)
疑難解答
圖片精選