LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-30-2008, 03:00 PM   #1
kriskras
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Rep: Reputation: 0
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!
 
Old 04-30-2008, 03:04 PM   #2
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542

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

To see your PATH type
echo $PATH
 
Old 04-30-2008, 03:16 PM   #3
kriskras
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by DotHQ View Post
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.
 
Old 04-30-2008, 03:22 PM   #4
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia 4
Posts: 714

Rep: Reputation: 35
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?
 
Old 04-30-2008, 07:17 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
/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.
 
Old 05-01-2008, 07:41 AM   #6
kriskras
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by DiBosco View Post
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?
 
Old 05-01-2008, 07:42 AM   #7
kriskras
LQ Newbie
 
Registered: Apr 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
/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.
 
  


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
What is difference between /usr/sbin/ps & /usr/ucb/ps command rajaniyer123 Solaris / OpenSolaris 6 07-05-2007 01:53 PM
making files available in /usr/local/bin and /usr/sbin reakinator Linux - Newbie 1 10-14-2006 06:09 PM
Is it ok to create links between /usr/sbin and /bin binaries? johnnygun Slackware 5 07-14-2004 03:09 AM
/usr/sbin and /sbin world read/executable... why? lazlow69 Slackware 3 04-29-2004 06:06 PM
As root, not seeing /sbin and /usr/sbin in path weghman Linux - Newbie 3 04-25-2004 02:06 PM


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

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration