Fedora Linux Support Community & Resources Center
  #1  
Old 14th August 2008, 03:33 AM
nix4me Offline
Registered User
 
Join Date: Oct 2006
Posts: 86
how to add path /usr/local/bin/lftp to user path

I compiled lftp from source and it installed to /usr/local/bin. Problem is, that is not in my path. So when i typr lftp from command line it says command not found. If i type /usr/local/bin/lftp, it of course works fine. How can i add that to my path so i don't have to type the full path each time?

And to answer why i compiled myself, because fedora compiles lftp against openssl and not gnutls, which cause problems.
Reply With Quote
  #2  
Old 14th August 2008, 04:01 AM
carpetfeller Offline
Registered User
 
Join Date: Mar 2008
Location: Owensboro, KY
Age: 36
Posts: 217
in ~/.bash_profile

change
PATH=$PATH:$HOME/bin

to
PATH=$PATH:$HOME/bin:/usr/local/bin


to apply changes instantly
from the command line enter:
PATH=$PATH:/usr/local/bin

Last edited by carpetfeller; 14th August 2008 at 04:05 AM.
Reply With Quote
  #3  
Old 14th August 2008, 08:32 AM
oneofmany Offline
Registered User
 
Join Date: Aug 2006
Posts: 226
Quote:
Originally Posted by carpetfeller
in ~/.bash_profile

change
PATH=$PATH:$HOME/bin

to
PATH=$PATH:$HOME/bin:/usr/local/bin


to apply changes instantly
from the command line enter:
PATH=$PATH:/usr/local/bin
not 100% accurate. if you want this change to apply for all users it would be better to modify /etc/profile rather than each user's .bash_profile. you should add the following line somewhere before the EXPORT line ..

Code:
pathmunge /usr/local/bin
additionally, you should export it so that its available in scripts and subshells. in the profile it's already exported but on the command line you should do..

Code:
export PATH=$PATH:/usr/local/bin
Reply With Quote
  #4  
Old 15th August 2008, 01:51 AM
nix4me Offline
Registered User
 
Join Date: Oct 2006
Posts: 86
thanks, works
Reply With Quote
  #5  
Old 20th August 2008, 01:27 PM
carpetfeller Offline
Registered User
 
Join Date: Mar 2008
Location: Owensboro, KY
Age: 36
Posts: 217
Quote:
Originally Posted by oneofmany
not 100% accurate.
Actually, it was 100% accurate. I don't recall him asking how to do it for all users. Plus, it would be better to do it for only the users who need it. Plus, does it not work? Choose your words wisely.

Last edited by carpetfeller; 21st August 2008 at 01:25 AM.
Reply With Quote
  #6  
Old 20th August 2008, 02:02 PM
scottro Offline
Retired Community Manager -- Banned from Texas by popular demand.
 
Join Date: Sep 2007
Location: NYC
Posts: 8,142
Take it easy folks. It could have probably been phrased better, and probably wasn't meant in any sort of mean way. We don't know if the OP wanted a system wide change or just for one user, so we're all guessing. Regardless, no doubt the OP is appreciative of both answers because regardless of the original purpose, now they have the knowledge to make it system wide or limit it to one user.

Additionally, the OP, or anyone who comes across this thread in the future, will realize that there's a way to make it system wide AND a way to limit it to one user.

So... in my very humble opinion, it's simply a matter of the two of you saving each other a little typing.
Reply With Quote
  #7  
Old 18th August 2010, 12:31 AM
ghettocitizen Offline
Banned
 
Join Date: Aug 2010
Posts: 22
linuxepiphany
Re: how to add path /usr/local/bin/lftp to user path

There is some weirdness in my system, which was a fresh install of F13.
Users path has /usr/local/bin, but not root's.
That's a major inconvenience.

from /etc/profile:

Code:
# Path manipulation
if [ "$EUID" = "0" ]; then
    pathmunge /sbin
    pathmunge /usr/sbin
    pathmunge /usr/local/sbin
    pathmunge /usr/local/bin
else
    pathmunge /usr/local/bin after
    pathmunge /usr/local/sbin after
    pathmunge /usr/sbin after
    pathmunge /sbin after
fi
What am I doing wrong?
I tried putting command export PATH=$PATH:/usr/local/bin but rc.local does not execute.

Code:
[root@host ~]# set|grep PATH
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/sbin:/bin:/usr/sbin:/usr/bin
[root@host ~]# exit

[user@host ~]$ set|grep PATH
PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/sbin:/usr/sbin:/sbin:/home/user/bin

Last edited by ghettocitizen; 18th August 2010 at 12:36 AM.
Reply With Quote
Reply

Tags
add, path, user

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding path for user? IchBin Using Fedora 2 31st March 2006 03:13 PM
setting local path agentblue Using Fedora 2 1st May 2005 06:23 AM


Current GMT-time: 12:29 (Saturday, 30-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat