Highlight
Use bash mode for terminal:
- To edit ~/.bash_profile, add the following code:
Export clicolor=1export lscolors=gxfxaxdxcxegedabagacad
- Save, then restart Terminal, fix it, get back to normal (or source ~/.bash_profile)
Explain the meaning of the code in detail:
- Clicolor: String merge values for foreground and background colors
- 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