1. Linux is a multi-user operating system. Each user logs into the system and has a dedicated runtime environment. Usually the default environment for each user is the same. This default environment is actually a definition of a set of environment variables. Users can customize their own operating environment by modifying the corresponding system environment variables.
2, often modify the environment variables in the /etc/profile file, the content modified here is for all users.
The following main operations will be performed in this file.
3, how to add environment variables.
For example, add “NAME=liheng” .
Add the following at the end of the profile file export NAME=liheng
The variable value liheng can be quoted or not, the effect is the same. w
4. The content added or modified in the profile file needs to be logged off to take effect.
5. How to understand the definition of variables repeatedly.
What happens often is the definition of the PATH variable.
For example: in the peofile file, the default PATH variable is set to PATH=¥¥¥¥¥¥¥, which may be set in the PATH in the future, generally added to the last PATH=·· ···· (for example). The PATH=·······\\¥¥¥¥¥¥¥¥, which is recognized in the system, means that the environment variable of the same name will work first. Everyone must pay attention.
6, special characters introduced.
For example, the following contents are included in the profile, and the usage of the special symbols is explained by the following.
export A=/q/jing:aaa/cc/ld
export B=.:/liheng/wang
export A=/cd/cdr:$A
Everyone pays attention to the red symbol:
: Indicates the parallel meaning. For example, there are multiple values of the A variable, and the symbol is used for separation.
. Indicates the current directory of your operation. For example, the pap command will look for the B environment variable.
Type the pap command in /home, the system first finds the content of B in the /home directory (that is, the current path), if you do not find the content about B in the /liheng/wang directory.
$ represents the value of this variable before this definition, for example $A for /q/jing:aaa/cc/ld. That is to say
A=/cd/cdr:/q/jing:aaa/cc/ld
diskless boot everyone should have heard of it, and now many Internet cafes and enterprises have use
got a long time (about 3 days), and finally got through. At first I wanted to give up but slowly beg
Many media and experts believe that Linux believes that Linux is more secure than Windows. However,
I believe that many users who use Linux systems will feel that command line operations are faster th
Oracle, informix database environment variable settings and compile
The program does not have MySQL reports on the Linux server. Error
Five Linux simple commands to help you solve performance problems
How to effectively manage Linux system patches?
How to hide PHP version in Linux server
Let Linux boot automatically open NUMLOCK
Vsftpd 500 OOPS: cannot change directory
Linux terminal and X Window switch
How to migrate Weblogic from a virtual machine to a container
How to set up WinXP headphones without sound?
Easily set to reject windows 2003 leaks
Chrome plugin (shockwave flash) does not respond to the solution
Video Tutorial What should I do if my computer has no sound after installing Win10?
How to achieve the shortcut icon merged into the taskbar in the win7 system
Refuse to remotely modify the Windows 8 registry key value
How does the Win10 system rename, back up and restore power plans?
How does the Win7 system delete the linked files in the favorites?