Mac Terminal configuration

Source: Internet
Author: User
Tags bit set

Highlight

Use bash mode for terminal:

    1. To edit ~/.bash_profile, add the following code:
      Export clicolor=1export lscolors=gxfxaxdxcxegedabagacad
    2. Save, then restart Terminal, fix it, get back to normal (or source ~/.bash_profile)

Explain the meaning of the code in detail:

  1. Clicolor: String merge values for foreground and background colors
  2. Lscolors: For the color scheme used in different variables, see the following table:
    A black
    b Red
    C Green
    D Brown
    E Blue
    F Magenta
    G Cyan
    H Light Grey
    A Bold Black, usually shows up as dark grey
    B Bold Red
    C Bold Green
    D Bold Brown, usually shows up as yellow
    E Bold Blue
    F Bold Magenta
    G Bold Cyan
    H bold light grey; Looks like bright white
    x default foreground or background
    A list of file types is as follows:
    1. Directory
    2. Symbolic link
    3. Socket
    4. Pipe
    5. Executable
    6. Block Special
    7. Character Special
    8. Executable with setuid bit set
    9. Executable with Setgid bit set
    Directory writable to others, with sticky bit
    Directory writable to others, without sticky

So, against this watch, you can tell:

Gxfxaxdxcxegedabagacad

For directory, the foreground color is g (cyan), and the background color is: X (the default background color).

Auto complement ignores case

Open Terminal, enter:

Nano. Inputrc


Paste the following statement on the inside:

set completion-ignore-  case onset show-all-if-ambiguous ontab:menu -complete


Control+o, save, restart terminal

Ssh

In the Mac OS Terminal (terminal), you can use command SSH [email protected] command to remotely connect a service?, but what if the service you want to manage is too much, and the IP address can't all be remembered? At this time we can for each service? Set an alias, use the VIM command to edit the ~/.ssh/config file (if the file is not in the directory, you can create a new one), and then add content in the following format:

Host alias    HostName IP Address     -     user name

In addition, if you want to see which servers are currently configured with aliases, you can use the commandcat ~/.ssh/config | grep "Host"

Mac Terminal configuration

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.