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
We all know the drag-and-drop feature of HTML5, w...
Implementing process analysis (1) How to call rep...
Using DOSBox, you can simulate DOS under Windows ...
Table of contents The basic principles of Vue'...
Socat needs to be installed before installing rab...
Today, I will record how to install MySQL 8.0.18 ...
Error screenshot Can't find where the excepti...
Preface This article will explain how Vue compone...
mysql query with multiple conditions Environment:...
Table of contents 1. What are options? 2. What at...
How to recursively select all child elements usin...
Problem: When using JDBC to connect to the MySQL ...
Find the problem Today, when I tried to modify th...
A simple cool effect achieved with CSS3 animation...
Table of contents 1. Introduction 2. Main text 2....