Set your own liux alias

Source: Internet
Author: User

You can customize your frequently-used alias in your shell configuration. For example, when using CSH ~ /. Cshrc.

 

General alias:

Alias CD1 'CD .. /'Alias CD2 'CD .. /.. /'Alias cd4' CD .. /.. /.. /.. /'Alias cd3' CD .. /.. /.. /'Alias ls' ls -- color = tty 'Alias ll 'ls-la' alias lt 'LS-lh' alias lz' LS-lhrs 'Alias H' history 'Alias df' DF-H 'Alias du' Du-H' alias grep 'grep-RNE -- color 'Alias VD 'vimdiff 'Alias tf' tail-F' alias CLS 'clear' alias du0' du -- Max-depth = 0 'Alias du1' du -- Max-depth = 1 'Alias JS 'jobs' alias pu' pushd 'Alias PP' popd'

Others:

CD to the specified directory: alias cdxx 'CD/xxxxxxxx'

Rsh to a user: alias XXX 'rsh-l XXX localhost'

 

You can set alias for Common commands and directories.

 

Note that the above settings are in CSH. If the bash syntax is different, you need to use something similar to alias pp = 'popd '.

 

Finally, you can use your custom alias under any other user, as long as you source your. cshrc under another user.

 

Complete!

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.