LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   My linux won't recognize commands (https://www.linuxquestions.org/questions/linux-software-2/my-linux-wont-recognize-commands-46213/)

jpflager 02-19-2003 05:15 PM

My linux won't recognize commands
 
I'm having problems when trying to enter particular commands. For instance when I try to enter "service network restart" or even try to use Pico linux gives me an error message "command not found" I tried to use the "updatedb" command, but it didn't work. Any ideas?

wapcaplet 02-19-2003 05:23 PM

Are you running them as root? System-related utilities (like service, or updatedb) are not usually in the average user's path, and won't be recognized without a ful path name.

If you are trying to run them as root, try using the full path name, like /sbin/service, or /usr/bin/updatedb (yours might be in different locations, but you can usually check in /sbin, /usr/sbin, /bin and /usr/bin).

jpflager 02-19-2003 06:03 PM

Thanks, works like a charm, will and update db while I'm in these directories allow me to use the commands anywhere?

wapcaplet 02-19-2003 06:12 PM

I believe updatedb is intended for updating the locate database, allowing the 'locate' command to find files quickly. Aside from that I don't think it has any purpose.

So, you'd run 'updatedb' after installing a bunch of stuff, so the next time you run 'locate' it will be able to find those files.

In order to use the commands anywhere, you would need to add those paths to your profile. To find out what your current path is, type:

echo $PATH

To add other stuff to it, it's something like:

export $PATH:/usr/bin:/bin

(varies depending on what shell you use). Look for some shell HOWTOs, I am sure they will get you going :)


All times are GMT -5. The time now is 01:45 AM.