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
Table of contents Preface 1. insert ignore into 2...
When you start working on a project, it’s importa...
Say it in advance Nodejs reads the database as an...
Preface When scroll events such as scroll and res...
<br />Question: Why is it not recommended to...
Docker takes up a lot of space. Whenever we run c...
For databases that have been running for a long t...
The mysql connection must first be initialized th...
This article shares the specific code of JavaScri...
Preface The location in the server block in the N...
1. The component First.js has subcomponents: impo...
What is a selector? The role of the selector is t...
Table of contents 1. Route navigation 2. History ...
First method Alibaba Cloud and Baidu Cloud server...
mysql storage engine: The MySQL server adopts a m...