Linux system operation, sometimes need to modify the environment variable PATH path, and friends who are not familiar with the system do not know how to modify, the following small series will introduce you how to modify the environment variable PATH path.
such put /etc /apache /bin directory to the PATH, there are three ways:
1. # PATH = $ PATH: /etc /apache /bin
Using this method, it is only valid for the current session, which means that the PATH setting will be invalidated after logging out or logging out of the system
2.#vi /etc/profile
Add PATH=$PATH:/etc/apache/bin in the appropriate location (note: = there can be no spaces on both sides of the equal sign)
This method is best unless you manually force the value of PATH to be modified. Otherwise it will not be changed
3.#vi ~/.bash_profile
Modify the PATH line and add /etc/apache/bin to it
This method is for User-friendly
System Home Xiaobian reminder: If you want to change your PATH, you must log in again to take effect. The following methods can simplify the work:
If you modify /etc/profile, the editing ends. Then execute the source profile or execute the point command. /profile, the value of PATH will take effect immediately.
The principle of this method is to execute the /etc/profile shell script again. Note that if you use sh /etc/profile, it is not possible, because sh is executed in the subshell process, even if the PATH is changed. Will react to the current environment, but the source is executed in the current shell process, so we can see the PATH changes.
The above is the introduction of Linux to modify the PATH path of the environment variable. This article introduces three methods of modification. Some methods need to be re-login to take effect, and special attention should be paid during operation.
exfat is a file system for U disk. Many systems support the use of exfat format, bu
In the Linux system, due to operational errors, the /boot/grub/grub.conf file may be damaged or lost
Windows Phone is a mobile product under Microsoft. Windows Phone is not recognized
Debian boot does not enter the graphical interface method
Difference between Linux exit command and _exit command
What if CentOS 6.4 upgrades Python and yum is not available?
How does the Linux system simulate the get or post request of Http?
How to solve the garbled problem when opening Emacs under Linux?
Linux automatically generates a MAC address method summary
How to enter the command line after the Linux system GUI starts
RedHat/CentOS 7 Steps to Manage the Network Through the nmcli Command
Linux tips for viewing directory content
How to make a bootable img/iso image file on a Linux system
How to install fonts in batches in win7 system
What if the Foxmail password is forgotten? Foxmail lock password cracking method
Win10 preview version 14379 how to create all task toolbox folder?
What should I do if the Win7 network is not connected? Windows7 wireless network can not connect?
How to get more topics in Win10
Win10 hopes to successfully re-enact the success of win7
Win10 latest version of Build 11097 exposure: mainly adjust the underlying architecture
Talking about the optimization and security of Linux system