A serious problem has occured in my friends system that for every command in linux it is giving "command not found".
except "cd"
Even for "vim" it is giving command not found
Printable View
A serious problem has occured in my friends system that for every command in linux it is giving "command not found".
except "cd"
Even for "vim" it is giving command not found
What shell are you using... Also try switching shells and try.
sounds like the paths are hosed..
Since i don't know the shell, i cna't give any advice on fixing it, but if you type
and it returns nothing at all.. then indeed your paths are hosed.. then ask here as to how to reset them.Code:echo $PATH
Try logging in as a different user to see if that particular user profile my have bad paths listed. Take a look in the bin directory to see if your executable binaries are still there.
PuRe
In order to get most of your functionality, you'll need to type:
export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
Most users have another directory or two in their path, but that path should get you enough functionality to figure out what happened. The first places to check would be .bashrc in your personal directory. If you're not using bash, then .cshrc or .zshrc are possibilites. Look for commands in the file that set the path to something invalid. If you can fix the invalid comnmand, your path should be restored the next time you log in. If you don't find any errors in your .bashrc file, the next possibility is the /etc/bashrc file. This is the system-wide configuration file for the bash shell. There are other possiblities of course, but those are probably the two most likely culprits.
Well thanx for the replies the shell he is using is bash shell and no command is working not even EXPORT.It is just telling command not found.
Thanx for the interest.
Get root access and look at the .profile (sometimes .bash_profile) to see if anything has been changed. It sounds like he is missing his path information. You should be able to run commands by using absolute paths and most commands are in /bin or /sbin
open the shell and put your ear to the monitor. do you hear the ocean?
And this helps him how?Quote:
Originally posted here by sickyourIT
open the shell and put your ear to the monitor. do you hear the ocean?
thank u for the replies. Actually I played with the system and did "export path" and it all came to normal again.
once again thanx for the replies.