LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Executing binaries in /usr/sbin/ seems to be broken (http://www.linuxquestions.org/questions/linux-newbie-8/executing-binaries-in-usr-sbin-seems-to-be-broken-638951/)

kriskras 04-30-2008 02:00 PM

Executing binaries in /usr/sbin/ seems to be broken
 
Dear fellow Linux users,

I am pretty new to the linux area so what I am trying to do is executing binary files in the /usr/sbin/ directory.

No matter what I do, if I want to execute any program at all I always get
Bash: command not found

I have tried nstat and many other programs but the same message shows up.

I am using Eeedora and logged me in as superuser.

Could anyone please help me, that would be very grateful!

DotHQ 04-30-2008 02:04 PM

If the dir is not in your PATH type:
./filename.bin to make it run.

To see your PATH type
echo $PATH

kriskras 04-30-2008 02:16 PM

Quote:

Originally Posted by DotHQ (Post 3138010)
If the dir is not in your PATH type:
./filename.bin to make it run.

To see your PATH type
echo $PATH

Thank you, it works. Awesome.

I thought my PATH was actually /usr/sbin but it turned out that this was not included at all. Why is it? And is there any possibility to add /usr/sbin to my PATH?

Thanks for sharing your knowledge.

DiBosco 04-30-2008 02:22 PM

Have a look here.

Don't forget to do it as root, otherwise (I think) you'll give user access to sbin!

BTW, as a matter of caution, are you really logged in as root or as user and then gone to su?

chrism01 04-30-2008 06:17 PM

/usr/sbin contains binaries that normally would only be used by root. To use them, simply prefix the path eg
/usr/sbin/binary-you-want
Personally i wouldn't mess with the PATH var here, the arrangement is there for a reason.

kriskras 05-01-2008 06:41 AM

Quote:

Originally Posted by DiBosco (Post 3138020)
Have a look here.

Don't forget to do it as root, otherwise (I think) you'll give user access to sbin!

BTW, as a matter of caution, are you really logged in as root or as user and then gone to su?

I started as a user, but switch in the beginning of the procedure to su. Is that a sufficient answer to your question?

kriskras 05-01-2008 06:42 AM

Quote:

Originally Posted by chrism01 (Post 3138188)
/usr/sbin contains binaries that normally would only be used by root. To use them, simply prefix the path eg
/usr/sbin/binary-you-want
Personally i wouldn't mess with the PATH var here, the arrangement is there for a reason.

Okay, thank you for your advise.


All times are GMT -5. The time now is 06:11 AM.