hi all,
I am new to linux, sometimes i wonder if there is a way to search for the utility command such as useradd or ifconfig. The reason i ask is, in Fedora, there are many command that are hiding in different places.
For example, I now know useradd is under /usr/bin/ and ipconfig is under /sbin, and so does shutdown command. But if i don't know where a command is, is there a way to figure it out quickly instead of digging it up from the book or the internet?

Hi k2k,

There are a few options. Usually, if you're the root user, these things are in your "PATH". Are you by any chance logging in as another user, and using the "su" command to get to root? if so, try using "su -l". This will start a login shell, and import all of root's default paths.

If a command is in your path, you can use the "which" command to find the full path if you need it. In your case, it looks like things like /sbin and /usr/sbin are missing from your path. If you've got slocate installed, you can use the "locate" command to find most things.

Hope this helps!
-G

locate will work only if you use updatedb before that

also whereis and which commands are OK

basically, most commands are in /sbin and /usr/bin so no need to look for them.

if you don't know what command you need, use google.com/linux to look for a certain functionality

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.