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
相關文章
相關標籤/搜索