In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to modify the environment variable PATH path in Linux system, aiming at this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
The operating system is indispensable in the computer. And the development of Linux is very rapid, there is a trend to catch up with Microsoft. Here introduces the knowledge of Linux, so that you can learn to apply Linux system well. For example, to add the / etc/apache/bin directory to PATH, there are three ways:
1.#PATH=$PATH:/etc/apache/bin
Using this method, it is only valid for the current session, that is, every time you log out or log out of the system, the PATH setting becomes invalid.
2.#vi / etc/profile
Add PATH=$PATH:/etc/apache/bin at the appropriate location (note: = that is, there cannot be any spaces on either side of the equal sign)
This method will not be changed unless you manually force the value of PATH to be changed.
3.#vi / .bash_profile
Modify the PATH line to add / etc/apache/bin
This method works for users.
Note: if you want to change the PATH, you must log in again to take effect. The following methods can simplify the work:
If / etc/profile is modified, the value of the source profile or dot command. / profile,PATH will take effect immediately after editing.
The principle of this method is to execute the / etc/profile shell script again, note that it is not possible to use sh / etc/profile, because the sh is executed in the child shell process, even if the PATH changes will not be reflected in the current environment, but the source is executed in the current shell process, so we can see the PATH change.
This is the answer to the question about how to modify the PATH path of the environment variable in the Linux system. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.