LinuxQuestions.org
Visit Jeremy's Blog.
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 09-13-2004, 03:57 PM   #1
kingtas
Member
 
Registered: Sep 2004
Distribution: RH9
Posts: 36

Rep: Reputation: 15
Running Applications


Please tell me what is going on here!!!!!

I login to my Redhat 9 Server as user and SU from the terminal.

I try to run any application like dump or fdisk and I get:

bash: fdisk: Command not found.

I whreis fdisk and get /sbin/fdisk so I cd to /sbin and type fdisk /dev/hdb and get the same response.

bash: fdisk: Command not found.

What am I doing wrong here?
 
Old 09-13-2004, 04:08 PM   #2
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
Hi kingtas!

sbin is normally not part of the $PATH (list of directories to search for executables). Moreover . (DOT, current directory) is neither part of $PATH. Therefore, if you want to run an application in the current directory you should type ./fdisk

Martin
 
Old 09-13-2004, 04:27 PM   #3
kingtas
Member
 
Registered: Sep 2004
Distribution: RH9
Posts: 36

Original Poster
Rep: Reputation: 15
That worked. Thanks.

What file do you edit to add paths for executables?
 
Old 09-13-2004, 04:31 PM   #4
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
http://www.linuxquestions.org/questi...hreadid=229841

Edit: A word of caution. It's considered bad security practice to add . (dot) to the path, especially for the root user. Otherwise you would run different programs depending on where you are at the moment which is potentially dangerous.

Martin

Last edited by MartinN; 09-13-2004 at 04:34 PM.
 
  


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
Running gtk applications shezkhan Linux - Software 1 11-24-2005 09:32 AM
need help running remote X applications zero79 Debian 5 06-11-2005 09:55 PM
Applications not running... clemons Linux - Software 2 10-27-2004 11:10 PM
running applications from different terminals masand Linux - General 0 04-08-2004 06:23 AM
running applications in X as root Fingers Linux - Newbie 2 04-15-2001 10:45 PM


All times are GMT -5. The time now is 10:38 PM.

Main Menu
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