`
chengyuanheng
  • 浏览: 18579 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

how to set alias and cancel alias in linux ?

 
阅读更多

SET:

 

1. run:  sudo vi ./.bashrc

2. set:  alias s_yes='yes'

            alias s_banner='banner'

            alias s_ddate='ddate'

            alias s_fortune='fortune'

            alias s_fortune_zh='fortune-zh'

            alias s_cal='cal 9 1752'

            alias s_xev='xev'

            alias s_xeyes='xeyes'

            alias s_cowsay='fortune | cowsay'

            alias s_cowthink='fottune | cowthink'

            alias s_factor='factor 999'

            alias s_g_moo='apt-get moo'

            alias s_b_moo='apt-build moo'

            alias s_sl='sl'

            alias s_logo='linuxlogo'

            alias s_oneko='oneko'

            alias s_who='who is i 

            alias lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative

            alias short_log = shortlog --format='%H|%cn|%s' | grep '#2230'

 

3. run:  source ~/.bashrc

 

CANCEL:

 

1. run:  sudo vi ./.bashrc

2. set:  unalias s_yes

            unalias s_banner

            ...............

3.run:   source ~/.bashrc

 

分享到:
评论
2 楼 chengyuanheng 2014-09-26  
why I need create a new file named .bash_alias ? when I use VI , I can create a new file auto 
1 楼 zhangfortune 2014-09-26  
why fortune in your fu*king alias ?

note: no need use sudo when edit your .bashrc, as we know .bashrc in our home dir

best do: create a new file named .bash_alias then source it in you .bashrc 

相关推荐

Global site tag (gtag.js) - Google Analytics