LinuxQuestions.org
Review your favorite Linux distribution.
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 03-10-2006, 06:38 PM   #1
crazyjedi
Member
 
Registered: Mar 2006
Location: birmingham uk
Distribution: Fedora 7 + Ubuntu
Posts: 36

Rep: Reputation: 15
Unhappy Why doesn't linux understand my commands


I bought redhat linux fedora for dummies, book and instalation DVD and carried out the instructions correctly (as far as i can tell).
everything seems ok when i first log on but when a open a terminal window, log on as root, and try to input a command as quoted in the book (eg iptables -L)i receive the message 'iptables command not konwn'. all commands seem to be replied with 'command not known'. I guess i must have messed up the installation some how. I've tried re-installing but the problem persists.
I'm new to linux and really want to get into this but i'm growing very frustrated.
please help!
 
Old 03-10-2006, 06:41 PM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
This is because you're running those commands as an unpriviledged user and those specific ones need to be executed as root. The reason is that those commands (eg: iptables) are typically in root's $PATH.

So, either run these as root, or modify your $PATH so those directories are in it. I advise reading RUTE.
 
Old 03-10-2006, 06:44 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,568

Rep: Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865Reputation: 5865
su will use the users environment not root's
su - will use roots environment.
 
Old 03-10-2006, 07:35 PM   #4
victorh
Member
 
Registered: Jul 2005
Location: La Paz, Bolivia
Distribution: Debian Sarge - Sid, Slackware, Gentoo, openSuse, Fedora, Ubuntu, Mandriva
Posts: 241

Rep: Reputation: 30
Actually Fedora is very peculiar in this. Even you are root you can't use the commands reserved for root in any directory. You have to go to /sbin and then use these comands using ./iptables for example.

If you want to correct this bevahior, follow scuzzman advice and modify your $PATH and include /sbin.
 
  


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
Suse Linux Commands For These Aix Commands? Vaskar Guha Linux - Software 2 12-19-2005 12:45 AM
my linux box doesn't understand... thepeeratt Linux - Security 5 11-21-2003 02:57 PM
come on i want to use & understand linux already Laptop2250 Linux - Newbie 11 10-29-2003 02:16 PM
Trying to understand linux quintino Linux - Newbie 3 02-02-2002 04:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:45 PM.

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