Show your shell a bit of color

Source: Internet
Author: User
Tags bit set

Let's give your shell a bit of color. To avoid setting for every user, directly modify the/etc/profile file 1. in Linux, add the following three lines: give your ls a bit of color [html] alias ls = '/bin/ls -- color = auto' give your grep a bit of color [html] alias grep = 'grep -- color' give your vi color [html] alias vi = 'vim '2. add three lines under Mac: give your ls a bit of color [html] alias ls = '/bin/ls-G' give your grep a bit of color [html] alias grep = 'grep -- color' give you vi color [html] alias vi = 'vim '3. modify color/etc/profile add [html] export CLICOLOR = 1 export LSCOLORS = gxfxaxdxcxegedabagacad CLIC OLOR is used to set whether to display the color. CLI is the abbreviation of Command Line Interface. LSCOLORS is used to set the color of various file types when CLICOLOR is enabled. Each two letters in LSCOLORS is a group. The text color and background color of a file type are set. LSCOLORS contains 11 sets of colors. The following file types are set in sequence: [html] directory symbolic link socket pipe executable block special character special executable with setuid bit set executable with setgid bit set directory writable to others, with sticky bit directory writable to others, in without sticky bit LSCOLORS, the letter color is as follows: [html] a black B red c green d brown e blue f ocean red g blue h light gray A black bold B red bold C green bold D brown bold E blue bold F ocean red bold G blue bold H light gray bold

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.