LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-28-2004, 04:20 PM   #1
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Rep: Reputation: 30
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.
 
Old 08-28-2004, 04:21 PM   #2
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Original Poster
Rep: Reputation: 30
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?
 
Old 08-28-2004, 04:38 PM   #3
Crunch
Member
 
Registered: Feb 2003
Location: York, PA
Distribution: Slackware, FreeBSD, OpenBSD
Posts: 162

Rep: Reputation: 30
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...
 
Old 08-28-2004, 04:47 PM   #4
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Original Poster
Rep: Reputation: 30
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.
 
Old 08-28-2004, 05:05 PM   #5
Netizen
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Slackware and Ubuntu
Posts: 355

Rep: Reputation: 30
Actually, if you browse to the folder then you have to do...

Code:
$ ./<executable>
 
Old 08-28-2004, 05:24 PM   #6
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Original Poster
Rep: Reputation: 30
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?
 
Old 09-01-2004, 09:02 AM   #7
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
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'
 
Old 09-01-2004, 10:03 AM   #8
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
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
 
Old 09-01-2004, 10:08 AM   #9
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Original Poster
Rep: Reputation: 30
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
 
Old 09-01-2004, 10:14 AM   #10
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
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'
 
Old 09-01-2004, 10:25 AM   #11
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

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

Last edited by scuzzman; 09-01-2004 at 10:29 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
command not found murshed Linux - Newbie 8 11-22-2007 05:51 AM
bash: <command name> command not found smash Programming 5 03-13-2006 09:48 AM
command not found ginda Linux - General 3 07-16-2005 05:15 PM
Command not found nfis Linux - Software 9 11-26-2003 12:00 AM
command not found jkp Linux - Newbie 3 01-21-2003 03:26 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration