0

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?

3
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by DimaYasny
0

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

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.