Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-10-2003, 01:28 AM   #1
LQ Newbie
Registered: Oct 2003
Location: San Francisco
Posts: 4

Rep: Reputation: 0
How do I put my programs in my PATH?

Redhat 9

I tried to edit vi .bash_profile to put a program in my PATH so I could just type in the name, but I couldn't get it to edit like I was showed.

Any help with this, or maybe a different approach?

Old 10-10-2003, 01:40 AM   #2
Registered: Sep 2003
Distribution: Slackware
Posts: 170

Rep: Reputation: 30
The main approach to modify your path is:

export PATH
And replace /your/new/path with what you are going to add.
An other approach is the following: you could create a symlink in a dir that already sits in your path, like /usr/bin.

$ ln -s /your/new/path/your_program /usr/bin/your_program

And check it by saying:

$ ln -l /usr/bin/your_program

This is what I get with e.g. sh:

ls -l /bin/sh
lrwxrwxrwx    1 root     root            4 Sep  5 11:40 /bin/sh -> bash*
Old 10-12-2003, 03:08 AM   #3
LQ Newbie
Registered: Oct 2003
Location: San Francisco
Posts: 4

Original Poster
Rep: Reputation: 0
That first approach worked perfectly.


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
Where to put programs? LoafOfBread34 Linux - Newbie 4 11-24-2005 03:07 PM
put my scripts to PATH Boby Linux - Newbie 1 06-14-2004 12:01 PM
where to put programs? NonSumPisces Linux - Newbie 4 05-26-2004 10:08 AM
where to put path to include file bonosa Linux - Newbie 1 05-25-2004 08:27 AM
How do i put a C compiler in my $PATH BajaNick Programming 4 10-08-2003 03:33 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration