Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've installed PgSQL 9.1.2 from PostgreSQL repositories and all it's fine except that I can't execute command from every path in my OS. For example suppose that I want to run the command pg_dump: for that I need to change from (actual path) to /usr/pgsql-9.1/bin and then execute as ./pg_dump even if I'm root user. I think in make a symlink for each executable under /usr/pgsql-9.1/bin in /bin but I don't know if this is the best way. Also I think in add this PATH="/usr/pgsql-9.1/bin:$PATH" to /.bashrc but didn't know the right way to do this. Any help on this?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Just open your .bashrc and add the following lines in the end:

PATH=$PATH:/usr/pgsql-9.1/bin
export PATH
share|improve this answer
    
Thanks a lot Aditya, it works like a charm –  ReynierPM Dec 29 '11 at 16:18
    
If it worked then please mark the answer as correct and upvote it. –  Aditya Patawari Dec 29 '11 at 16:24
    
How I do that? I can vote beacuse my reputation doesn't allow me at this moment –  ReynierPM Dec 29 '11 at 19:28
    
click on the up arrow above the "0" which is written just before the answer. If you cannot do it then wait till you get some reputation. Although it is strange that you cannot mark the answer correct for the question you asked. :( Marking correct answer is important because it saves time of others who come looking for similar problem. –  Aditya Patawari Dec 29 '11 at 19:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.