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. add three lines in Linux: Give your ls a color [html] aliasls & amp; #39;/bin/ls -- colorauto & amp; #39; give your grep a color [html] aliasgrep & amp ;... 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 for Mac: Give your ls a bit of color [html] alias ls = '/bin/ls-G' and give your grep a bit of color [h Tml] alias grep = 'grep -- color' give your vi a bit of color [html] alias vi = 'vim '3. modify the color/etc/profile add [html] export CLICOLOR = 1 export LSCOLORS = gxfxaxdxcxegedabagacad CLICOLOR 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
Related Article

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.