11th chapter, Understanding and learning the operating environment of Bash Bash Shell

Source: Internet
Author: User
Tags builtin

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?

    1. Run the command in a relative/absolute path, such as "/bin/ls" or "./ls";
    2. Run by alias to find the command;
    3. Run by Bash built-in (BUILTIN) command;
    4. 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

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.