Common shell Variables

Source: Internet
Author: User
1. Embed shell Variables

1> cdpath: this variable retains some directory information, separated by the colon.

If this variable is set, shell will first find the value saved in this variable when a directory is stored in CD;

If the CD switch directory is saved in this variable, switch to this directory.

2> exinit: this variable saves the initialization options in the VI Editor, such as displaying the row number and adding the tab key to the 10th spaces,

Command: exinit = 'set nutab = 10'; export exinit

3> Home: Home Directory, which is usually used to locate the last 2nd columns of the passwd file and specify that the user logs on to his/her directory,

Save your own file information in this directory. When "CD $ home" is input, it is switched to the user's directory.

4> ifs: Used for the default domain separator specified by shell. The default domain separator can be space, new line, and Tab key.

5> LOGNAME: Save the login name

6> mail: Save the email path. The default path is/var/spool/mail/<login-Name>. 7> mailcheck: by default, the new email is not checked for 60 s. You can set it to another time, such as 180 s.

8> mailpath: stores the email path of multiple users. setting this variable overwrites the mail value.

9> path: stores the directory order for command or script search. sorting these directories is important because it is related to the query time of command execution; generally, we first query data from the root directory of the user to other directories.

10> ps1: Basic prompt. The super user is #. You can set it as needed.

11> PS2: the auxiliary prompt. The default value is ">". It is used to execute multiple-line commands or a command that exceeds one line.

12> shell: Save the default shell, which is usually set in/etc/passwd. You can modify it and use other shells.

13> terminfo: location where terminal initialization variables are stored in the terminal configuration file.

14> term: the storage terminal type. Set the term to the control sequence type that the application learns the terminal's response to the screen and keyboard,

Such as VT100 and vt200

15> TZ: Save the time zone value. Only the system administrator can change this setting.

2. Other environment variables

There are other reserved environment variables that will be used by other systems or command line applications.

1> Editor: Set the editor, which is usually used.

2> pwd: Save the current working path name.

3> Pager: Save the screen paging commands, such as PG and more

4> manpath: stores the directory of man files on the system, separated.

5> lpdest or printer: Save the default printer name. The printer name is specified for the print job.

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.