LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   bash: command not found (https://www.linuxquestions.org/questions/fedora-35/bash-command-not-found-157596/)

jc80 03-14-2004 02:34 PM

bash: command not found
 
I was previously using Mandrake 9.2. Any time I entered a command in the /sbin directory it worked. Now I'm using Fedora core 1 and I always get the error:
Bash: <command>: Command not found.

I ls the directory and the command I entered is right there staring me in the face.

What could be causing this? I entered the command as root and as a user, neither worked.

david_ross 03-14-2004 02:41 PM

Chances are that /sbin isn't in your PATH:
echo $PATH

jc80 03-14-2004 02:59 PM

I'm sorry I forgot to mention that I'm sort of new to the Linux area. So what you're saying is that I have to add /sbin to my path? could you explain in a little more detail how I would do that?

david_ross 03-14-2004 03:11 PM

You can add it to your path with:
export PATH="/sbin:"$PATH

To make the changes take effect for each new shell you will need to add that command to one of your shell startup files like ~/.bash_profile


All times are GMT -5. The time now is 11:08 AM.