LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-15-2005, 06:49 AM   #1
turalo
Member
 
Registered: Sep 2005
Location: NL
Distribution: linux, windows,
Posts: 115

Rep: Reputation: 19
Question Problems with shell, "command not found"


Hy guys, I have a problem on my Fedora core 4, if I type some commands it does not work, first I tryd something like "lynx" it says command not foud, but after that I tryd many commands it keeps saying command not found, I tryd just now "ifconfig" and also "ifconfig -a" again it says commmand not found, what is the problem ??? when I type in "who" it works, I also tyrd onder the Root . even then it says command not found, please help.
 
Old 12-15-2005, 06:55 AM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Maybe lynx simply isn't installed...? As for commands like ifconfig, these will only work as root.

How about you let us know which commands you're trying to run as a normal user and having troubles with, then which commands you're trying to run as root and having trouble with?
 
Old 12-15-2005, 07:00 AM   #3
turalo
Member
 
Registered: Sep 2005
Location: NL
Distribution: linux, windows,
Posts: 115

Original Poster
Rep: Reputation: 19
Question mmmm

actualy is the same in user mode or root mode,
I tryd commands like "who" "last" I made a text document with "vi" its working, but if I try like "ifconfig" or "lynx http://some site " than it returns to me with "command not found" in both root and user.
 
Old 12-15-2005, 07:44 AM   #4
turalo
Member
 
Registered: Sep 2005
Location: NL
Distribution: linux, windows,
Posts: 115

Original Poster
Rep: Reputation: 19
I checked its in the /sbin but it just does not work
 
Old 12-15-2005, 08:53 AM   #5
Cipher01
LQ Newbie
 
Registered: Apr 2005
Location: Somewhere
Distribution: Fedora Core 5
Posts: 12

Rep: Reputation: 0
Do you have lynx installed, I know that my Fedora Core didn't come wiht it, I had to download it. That may be the problem, or the command may not be found because you're not root.
 
Old 12-15-2005, 09:39 AM   #6
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
If your having problems with commands (ifconfig, who and such) then try locating them first by entering;

locate <command_name_here>

Example;
$ locate ifconfig
/sbin/ifconfig


If you get back and error the follow the instructions in the error message.

If you want to run an application and your not sure if it is installed or not then check if an application is available (installed) by using the rpm command and check by entering;

rpm -q <packagename_here>

Examples;

$ rpm -q lynx
package lynx is not installed

$ rpm -q firefox
firefox-1.5-1
(translation - yes, firefox is installed)

Remember to use the packagename and not the filename or you get something back like;

$ rpm -q firefox-1.5-1.i386.rpm
package firefox-1.5-1.i386.rpm is not installed
 
Old 12-15-2005, 10:07 AM   #7
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
command not found

Who are you trying to run ifconfig as. I know I can't run it as a normal user.
I have to do a su - root. Lenard is right though. The /sbin holds a lot of the administrative commands and one of those commands is ifconfig.
 
Old 12-15-2005, 11:40 AM   #8
turalo
Member
 
Registered: Sep 2005
Location: NL
Distribution: linux, windows,
Posts: 115

Original Poster
Rep: Reputation: 19
I'm runing it as root,
its installed, its in the folder, I can locate it like you say , but when I write : ifconfig -a or ifconfig then it says command not found, when I try "who" or "w" then it works , so its not with all commands. I chekd also with rpm it says its installed, it shows the man directorys form man info, and it shows the bin directory where the file is .
 
Old 12-15-2005, 01:03 PM   #9
turalo
Member
 
Registered: Sep 2005
Location: NL
Distribution: linux, windows,
Posts: 115

Original Poster
Rep: Reputation: 19
Hy guys, this problem making me realy sick now, I cant use any normal command, when I type in the command it says : command not found, firt it was only thing like ifconfig or ifconfig -a , and I was thinking that maybe is something with the ifconfig, but now I just installed Apache 2.2 everything wass ok ./configure, make, make install everything went good, now I want to start my apache /usr/sbin/apachectl -k start , nothing works or if I do stop , nothing, it just comes up with " command not found"
:
[root@Vigor31 sbin]# clear

[root@Vigor31 sbin]# locate apachectl
/usr/share/man/man8/apachectl.8.gz
/usr/sbin/apachectl
/var/www/manual/programs/apachectl.html.ko.euc-kr
/var/www/manual/programs/apachectl.html
/var/www/manual/programs/apachectl.html.en
[root@Vigor31 sbin]# apachectl -k start
bash: apachectl: command not found
[root@Vigor31 sbin]# ls
accept

Im logged on as root, please help me, this is very strange but some commands like "who" "last" "df" are working, but others not.
I have Fedora core 4.
 
Old 12-16-2005, 08:16 AM   #10
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
If you are in the directory where the command is found then you need to something like;

./apachectl -k start

or

/usr/sbin/apachectl -k start

Also notice the path where command is; usr/sbin
And where you are; pwd

who is in the /usr/bin directory location and should be in your path, the commands that work are more then likely in your path, the ones that do not more then likely are not. Your current path can be known by simply typing;

$PATH

You should also realize that a normal users path is not the same as root's path. If you are using 'su' to switch to root you inhert the current users path and not root's path, you need to use 'su -' to get root to use root's path.
 
Old 12-17-2005, 08:04 AM   #11
turalo
Member
 
Registered: Sep 2005
Location: NL
Distribution: linux, windows,
Posts: 115

Original Poster
Rep: Reputation: 19
Smile hy guys

Ok ok, I'm happy again,

the commands issue was a problem of the PATH's when I loged in as root li " su " it was not on the right path I think, thanks to all of you here on the forum who told me to try " su - " that helped
now my apache is up and runing and now I'm going to try to install LYNX on my linux, when I'll finish that one then I will start with the configuration of my apache.
Like I said I want it in shell thaks guys, now I need help with installing lynx.
 
  


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
"bash: rpm: command not found" errom when trying to install any package sandeepchau123 Linux - General 16 07-06-2008 03:58 AM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
LFS 6.0 error: glibc fails check with "g++: command not found" peristaltic Linux From Scratch 1 03-15-2005 07:52 PM
Benoit's Alcatel - pppd call adsl "command not found" GM287 Linux - Networking 5 04-04-2004 09:56 AM
Anybody having problems with "make" in RedHat 7.3? "cc" not found ? Rampage2884 Linux - General 4 05-14-2002 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:55 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
Open Source Consulting | Domain Registration