-   Linux - Newbie (
-   -   Running Applications (

kingtas 09-13-2004 03:57 PM

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?

MartinN 09-13-2004 04:08 PM

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


kingtas 09-13-2004 04:27 PM

That worked. Thanks.

What file do you edit to add paths for executables?

MartinN 09-13-2004 04:31 PM

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.


All times are GMT -5. The time now is 02:59 PM.