Unix_linux Learning (5) -- Understanding bash and shell (1)

Source: Internet
Author: User

1. What is shell?
The operating system interface. The shell can call the corresponding hardware through the kernel.
2. What is Bash?
Bourne again shell (BASH) is actually a version of shell.
3. BASH Shell functions:
1) command compilation function (command history );
2) command auto-completion function (press the tab key );
3) alias function. For example, if alias LA = 'LS-al' is added to bash, you can enter LA to query the document attributes (previously used when zhcon was configured );
4) Work Control (jobs) and multi-task control;
5) wildcard characters are supported.
4. Through the use of the type command, we can know whether each command is a bash built-in command, such as Type LS;

Summary: After we successfully log on to the terminal (TTY), Linux will give us
Shell. The default is Bash. Then we can operate the shell according to the command issuing method above.

5. The type command is used to query variables. For example, if type $ path is executed, the content of path is displayed;
6. Define the variable: for example, name = xxx. Execute type $ name to view the variable content;
7. Check the environment variable EVN. The meanings of each variable are as follows:
• Home: represents the user's home directory. Remember that we can use CD ~ Go to the user's home directory? Or use CD
You can directly return to the user's home directory.
That is to use this function ~ Many programs may use this variable.
Oh!
• Shell: tell us which program is the shell used in this environment currently? If it is Bash, the default setting is
/Bin/bash!
• Histsize: This is related to the "History command", that is, the commands we issued can be recorded by the system,
The number of records is set by this value.
• Env: the user uses the personalized environment to set the file to be read.
• Mail: When we use the MAIL command to receive emails, the system will read the mailbox file ).
• PATH: the path for executing the file search ~ The directory and directory are separated by a colon (:), because the file search is in order
The directory is queried by the directory in the PATH variable. Therefore, the directory order is also important.
• LANG: This is important!
It is the archives of the language family ~ Many data will be used. For example,
When we start some Perl
In the program language file, he will take the initiative to analyze the data files of the language family. If he finds that he is not able to parse the encoding language family, it may
An error occurs! In general, our Chinese encoding is usually zh_tw.big5 or zh_TW.UTF-8, the two Encoding
It is not easy to interpret, so sometimes you may need to revise the data of the language family. This part will be smaller
Section!
• Random: This is a random number variable!
The SET command is to view all variables.

Come here today.

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.