Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Solution to unrecognized linux command

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly discusses the solution of non-recognition of linux commands. There is a certain reference value, friends in need can refer to, follow the editor to see the solution.

Solution:

First, modify the path value directly

First execute the following command to add the destination path to the PATH

Export PATH=/usr/bin/:$PATH

Then check to see if the addition is successful.

Echo $PATH

This method takes effect immediately, but restores the original PATH settings after shell is turned off, and is valid only for the currently logged in user.

Modify the .bashrc file (hidden file)

View the settings of the $PATH variable

Echo $PATH

Open the .bashrc file

Vi .bashrc

Add the following command on the last line:

Export PATH=$PATH:/xxx/xxx

Enter the following command to take effect immediately and permanently, only for the current user

Source.bashrc

Modify the profile file (in the / etc directory)

Open the profile configuration file

Vi / etc/profile

Add the following command to the last line

Export PATH=$PATH:/xxx/xxx

After the system is rebooted, it will take effect permanently, and all users will be available.

The solutions described above are not recognized by the linux command, and the specific usage needs to be used by everyone through hands-on experiments. If you want to know more about it, welcome to follow the industry information channel!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report