The operating environment of the Bash Shell:
Configuration values are divided into the overall system configuration values and preferences of each person, only some files placed in different places!
Path and command search order
When a command (such as LS) is released, which LS is it running?
- Run the command in a relative/absolute path, such as "/bin/ls" or "./ls";
- Run by alias to find the command;
- Run by Bash built-in (BUILTIN) command;
- Run through the first command that is searched $PATH the order of this variable.
It can be found that LS has color but/bin/ls has no color. Because/bin/ls is used directly with the command, and LS uses the command alias "Alias ls= ' ls--color=auto '!"
If you want to know the order of command search, you can enter type-a ls to query
[Email protected] jdk1. 7 ls ls is aliased to 'ls --color=auto'ls is/bin/ls
Examples:
Configure Echo's command alias to become echo-n, and then observe the order of Echo run
For:
[Email protected] jdk1. 7 Echo Echo is aliased to 'Echo -e'echo is a shell builtinEcho is/bin/Echo
Bash's pit stop and welcome message:/etc/issue,/ETC/MOTD
When the terminal interface (tty1 ~ tty6) Landing, there will be a few lines of prompt string
This information is written in/etc/issue
more/etc/6.4 (Final) Kernel \ r on an \m
The meaning of each code within the issue |
\d the date of the local end time; \l Display the first terminal interface; \m Display hardware level (i386/i486/i586/i686 ...) ; \ n Displays the network name of the host; \o display domain name; \ r operating system version (equivalent to uname-r) \ t Displays the time of the local end time; The name of the \s operating system; The version of the \v operating system. |
11th chapter, Understanding and learning the operating environment of Bash Bash Shell