Linux - bashrc之alias

1. cd ~

2. touch .bashrc // 若该文件不存在的话

3. vim .bashrc

----------------复制粘贴如下文本---------------

# alias ls='ls -G'

# alias ll='ls -il'

# alias la='ls -a'

# alias lla='ll -a'

# alias mkdir='mkdir -p'

# alias rmdir='rm -r'

 

# [ source

alias alias-source-bashrc='source ~/.bashrc'

# ] source

  

# [ aliyun

alias alias-aliyun-ecs-connect='ssh root@47.92.135.213'

alias alias-aliyun-rds-mysql-connect='mysql -hrm-wz9pj74p3a69k4xqy8o.mysql.rds.aliyuncs.com -P3306 -uroot -pMd_130627 --prompt "\u@\h \d>"' 

# ] aliyun

  

# [ mysql

alias alias-mysql-start='sudo /usr/local/mysql-5.7.20-macos10.12-x86_64/support-files/mysql.server start'

alias alias-mysql-stop='sudo /usr/local/mysql-5.7.20-macos10.12-x86_64/support-files/mysql.server stop'

alias alias-mysql-restart='sudo /usr/local/mysql-5.7.20-macos10.12-x86_64/support-files/mysql.server restart'

alias alias-mysql-connect='mysql -uroot -proot -P3306 -h127.0.0.1 --prompt "\u@\h \d>"' 

alias alias-mysql-cdhome='cd /usr/local/mysql-5.7.20-macos10.12-x86_64'

# ] mysql

 

# [ cd

alias alias-cd-mysql-home='cd /usr/local/mysql-5.7.20-macos10.12-x86_64'

# ] cd

 

# [ susulink

# alias alias-susulink-upload-dist-to-aliyun-ecs='scp -r ~/code-space/angular/susulink/dist root@47.92.135.213:~/code-space/SuSuLink'

# ] susulink

---------------复制结束-----------

4. source .bashrc

posted @ 2018-06-14 20:20  AndreMao  阅读(3887)  评论(0编辑  收藏  举报