Linux command fail
Problem Description
Command in Centos undefined after I updated environment variable. Including install command like vim,vi,ls,ll,sudo,systemctl.
Solution
- Use command below can fix the problem temporary, but export command only valid on current ssh link. It breaks after close the window.
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin - Edit or delete the wrong config added in
/etc/profilebyvim /etc/profileor edit file~/.bash_profilebyvim ~/.bash_profile - Activate the config by execute
source /etc/profileorsource ~/.bash_profile