LinuxQuestions.org
Review your favorite Linux distribution.
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 10-10-2003, 02:28 AM   #1
grenal
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?

Thanks
 
Old 10-10-2003, 02:40 AM   #2
wuck
Member
 
Registered: Sep 2003
Location: barneveld.nl
Distribution: Slackware
Posts: 170

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

Code:
PATH=$PATH:$HOME/bin:/your/new/path
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.
Use:

$ 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:

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

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


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


All times are GMT -5. The time now is 08:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration