Virtual Machines

Products

Virtual Machines

Documentation > Products > Virtual Machines > Linux System Prompts-bash:ls:command not found

Linux System Prompts -bash:ls:command not found

Problem Phenomenon:

When executing any basic commands, it prompts command not found, as shown in the figure:

Problem Causes:

It is caused by abnormal system environment variable.

Solution:

Permanently Effective Mode:

Change to the correct environment variable and open /etc/profile with the absolute command vi

vi /etc/profile

Add:

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

Temporarily Effective Mode:

Direct Execute

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If your problem still can not solved, please submit open ticket to us.

Update Time:2019-08-28 21:38:32