Detailed description of environment variables-general Linux technology-Linux technology and application information. The following is a detailed description. In LINUX, run the following command:
Env
You can see the environment variables.
For example:
PWD =/home/wang
HOSTNAME = abcd.net
USER = wang
MACHTYPE = i386-redhat-linux-gnu
FTP_PASSIVE = 1
MAIL =/var/spool/mail/wang
BASH_ENV =/home/wang/. bashrc
LOGNAME = wang
SHELL =/bin/bash
HOSTTYPE = i386
OSTYPE = linux-gnu
History Size = 1000
HOME =/home/wang
TERM = xterm
The environment variable name is before the equal sign, and the environment variable value is after the equal sign.
The environment variable name can be used in the program. The program can obtain its value and decide how to operate, run, find paths, folders, and so on based on the value.
The usage of environment variables is similar to that of PC (Windows.
You can run the following commands to change the environment variables of a PC:
Set
See. For example:
ComSpec = C: \ WINDOWS \ system32 \ cmd.exe
CPU = i386
HOMEDRIVE = C:
LIB = C: \ program Files \ MicroSoft Visual Studio \ VC98 \ LIB ;..
OS = Windows_NT
Path = C: \ Program Files \...
PROMPT = $ P $ G
....
The environment variable name is before the equal sign, and the environment variable value is after the equal sign.
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