Annoying terminal problem

Man of Honour
Joined
29 Jun 2004
Posts
21,636
Location
Oxfordshire
Hey guys

I should mention that I'm very new to Linux first off, just using Fedora 8 at the moment

Thing is, I'm trying to teach myself to use the terminal and not be a slave to the GUI. I'm currently looking through a lot of sites online and learning quite quickly.

One site in particular gives reference to all the bash commands and what they do. However, as most seem to work, a lot of them don't work just by typing them in

For example, I'm trying to teach myself some basic administration, adding users, adding policies, groups etc

But, when I use the 'useradd' command, it doesn't work. If I however change directory to /usr/sbin then type './useradd <name>' it works fine. Yet passwd can just be typed on its own

Another example is ifconfig or iwconfig, have to be set to the appropriate directory /sbin

Is there a way to make all these commands available just from the off without having to remember each and every directory for each command. It's worth mentioning I am using root as well so thats not the problem

Cheers guys

P.S - Are there any books out there to teach the basics of sysadmin? Want to learn quite quickly
 
Yep that sounds like the problem, if you type echo $PATH then that will output all the directories that you can run an executable from just by typing its name, without the need to navigate to it and ./..., So you will just need to add any extra directories onto the end of PATH.
 
Tools such as that are intended for us by system admins operating as root. Root has those directories in his path, so can run them without referencing a full path. Root may also be the only user with permissions to execute them...
Keep in mind that to run some applications you'll have to be logged in as root, or using sudo. Normal users arent intended to use them. If I remember rightly, useradd is one of those, which makes sense ;)
 
That's great thanks for all your help guys :)

Added the directories to the path in my login and it corrected everything :D

Will look into that book also, cheers for that
 
Tried the man pages? For any command, if you need help on what it does and how to use it you can type $ man <command> and it will give you lots and lots and lots of information about it.

EG try $ man man
 
Back
Top Bottom