The alias command sets aliases for frequently used directories

  1. vi ~/.bashrc, configure the various aliases you need, such as:

    alias cdhome='cd ~'
    alias cdroot='cd /'
    alias gpull='git pull'
    alias gci='git commit -a'
    alias gpush='git push origin HEAD:refs/for/master'
    alias gst='git status'

  2. Add source ~/.bashrc to ~/.bash_profile

  3. After completing the above two steps, reopen a terminal window, and you can view all the aliases you have set through alias. Direct cdhome can go to the system root directory, is it very convenient and fast? Give it a like now. . . .

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326809238&siteId=291194637