Commandisnotfound self-help Method for modifying/etc/profile in Linux

Source: Internet
Author: User

Commandisnotfound self-help Method for modifying/etc/profile in Linux

The bash command cannot be used after the blogger modifies the/etc/profile configuration file method.

The result of executing the ls command is as follows:

 

-Bash: ls: command is not found

Fortunately, the blogger backed up the/etc/profile, so I restored the profile through SSH, but now I need to execute

 

 

# Source/etc/profile

Make the configuration file take effect again. Unfortunately

 

 

-Bash: id: command is not found

The source command is unknown!

 

After being mentioned by Du Niang, we can use the command to re-use the PATH;

 

# Export PATH =/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

After executing the preceding command, you can re-execute the source/etc/profile command to make your configuration file take effect.

 

If your profile configuration file is not backed up, you can add the command address before vi if you cannot use the vi command directly.

 

#/Bin/vi/etc/profile

In this way, you can use the vi command to modify it!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.