LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Command not Found (https://www.linuxquestions.org/questions/linux-newbie-8/command-not-found-223600/)

zchoyt 08-28-2004 03:20 PM

Command not Found
 
I keep getting "command not found" when I try to run commands from terminal. Some of them work like locate, ls, dir, etc..

I try to run ifconfig, it gives me "command not found". Then I use "locate ifconfig" and see that it is in sbin. I then cd to /sbin/ and do a ls -al and I can see ifconfig. It is in this dir, and has executable permissions (it is green in color). Again if it type ifconfig it says "command not found.

This is not the only command it does this for. This is just an example to describe what is going on. Another is firefox. I installed it and I have the same problem with it.

Please gimme ideas.

Thx.

zchoyt 08-28-2004 03:21 PM

I also tried swithing to root thinking that that may be the problem but that didn't help anything.

PS What does it mean when you do ls and a file has a red background?

Crunch 08-28-2004 03:38 PM

You might want to try exporting the directory path into your ($)PATH variable.

Try this (with Bash, and Ksh)...
Quote:

$ export PATH=$PATH:/path/to/dir
$ echo $PATH
/path/to/dir:/path/to/dir:... Etc.
You don't need to, "echo $PATH," that's just to check to see if it worked. =)

For Csh
Quote:

$ setenv PATH $PATH:/path/to/dir
Hope this helps...

zchoyt 08-28-2004 03:47 PM

thanks for the reply.
I understand the path variable and how all of that works. Indeed this is not in the path, but if I browe to the folder where the file is and type the filename, then it should launch regardless of the path, right? It is not though.

Netizen 08-28-2004 04:05 PM

Actually, if you browse to the folder then you have to do...

Code:

$ ./<executable>

zchoyt 08-28-2004 04:24 PM

Ok, that works if I execute it that way. Thanks!

So what does it mean when I do an ls and the file has a red BG?

Oliv' 09-01-2004 08:02 AM

Hi,

Colors are defined in your /etc/dircolors file... So everything depends on this file. But In general, RED color is used for archives or compressed files ;)

Oliv'

scuzzman 09-01-2004 09:03 AM

Quote:

Originally posted by Oliv'
Hi,

Colors are defined in your /etc/dircolors file... So everything depends on this file. But In general, RED color is used for archives or compressed files ;)

Oliv'

On my system, a reg background with white text indicates a symbolic link

zchoyt 09-01-2004 09:08 AM

OK thanks. That's what I was after.

So what is a symbolic link? Is it like *.lnk on windows? I was reading somewhere how to make them. Just wanting to check to be sure. Can you compare/contrast that to making an alias in .bashrc?

thx
Zakk

Oliv' 09-01-2004 09:14 AM

Quote:

On my system, a red background with white text indicates a symbolic link
Yes if the background is red, it's a symlink... But on my system, that's a dead symlink. I mean, it points on nothing :(
To know what a symbolic link is: man ln ;) 'cause there's also hard link...

Quote:

Can you compare/contrast that to making an alias
A quick comparison would be: alias for commands and link for files ;)

Oliv'

scuzzman 09-01-2004 09:25 AM

[EDIT]
I was actually incorrect, I apologize if anybody read that and began symlinking their OS'es lol
[/EDIT]


All times are GMT -5. The time now is 07:49 PM.