A colleague asked me to help him figure out why many commands on his LINUX server could not be used, with the prompt (command not found). What was even worse was that many system services and scripts could not be run. Let me ask you, what have you done before? He said that I did the same operation, just added export PATH in the /etc/profile file, and asked, how did you set it? The answer is: [root@localhost ~]# vim /etc/profile export PATH=/usr/lib/jenkins/ [root@localhost ~]# source /etc/profile He said that he just added the default working directory of Jenkins and then used source to make the configuration file effective. In fact, this is exactly where the problem lies! PATH is the system environment path. All system commands and script executions are searched according to the PATH path. But if How to set the real system PATH? If it is a short-term setting: export PATH=$PATH:/usr/lib/jenkins/ If it is a long-term setting: [root@localhost ~]# vim /etc/profile export PATH=$PATH:/usr/lib/jenkins/ [root@localhost ~]# source /etc/profile In this case, the new search path is added to the original setting without overwriting the original PATH. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: Detailed explanation of CocosCreator Huarongdao digital puzzle
>>: How to quickly delete all tables in MySQL without deleting the database
Here, clever use of CSS techniques allows you to g...
1. Check the synchronization status of A and B da...
Recently, I need to stress test the server again....
Preface According to the project needs, Vue-touch...
Vue+Openlayer uses modify to modify elements. The...
This article shares with you how to install the M...
When I used g++ to compile the cpp file for the f...
Table of contents 1. Installation requirements 2....
1. Install mutt sudo apt-get install mutt 2. Inst...
Official Website https://cli.vuejs.org/en/guide/ ...
Table of contents Logical Layering Separate busin...
MySQL has the following logs: Error log: -log-err...
Scenario: When page A opens page B, after operati...
In order to speed up the parsing of the website, ...
The Internet is already saturated with articles o...