The /etc/profile file is broken, causing the command to be unavailable.

These days, when installing a software to set the environment variables, the / etc / profile file was inadvertently broken (that is, it was not configured correctly), causing all commands to be unavailable after source / etc / profile. The following are reported:

-bash: xxx: command not found

My first thought was to go into recovery mode and get rid of what I had just modified, and then I thought it would be a hassle or no, and I thought I was in a state where the virtual machine could be restored to the snapshot I had backed up before, but I was unwilling to deploy myself for a few minutes and the environment cleared up.So he went to the Internet to search for any other way, if not, with a command can be solved:

export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin

Using the above commands you can use common commands, but only for this modification, and then go to modify the profile error part of the content, modify it to the correct and then source okay, is it very exciting, haha!

Leave a Reply

Your email address will not be published. Required fields are marked *