Reply
 
Thread Tools Display Modes
  #1  
Old 10-02-2005, 07:33 AM
Deviad Deviad is offline
Junior Member
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default /usr/local/bin and /usr/bin
Hello,
I can't understand how to make install programs into /usr/bin instead of /usr/local/bin as I can't start them from any shell if they are located in the latter and I have to create symlinks from /usr/local/bin to /usr/bin for each program I install.
It would be good even if it was possible to add that directory amongst the "environment paths" like in Windows.
Thanks for help.
Reply With Quote
  #2  
Old 10-02-2005, 12:05 PM
Gorthaur Gorthaur is offline
Member
 
Join Date: Sep 2005
Location: Kiev, Ukraine
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Gorthaur
Default Re: /usr/local/bin and /usr/bin
Originally Posted by Deviad
Hello,
I can't understand how to make install programs into /usr/bin instead of /usr/local/bin as I can't start them from any shell if they are located in the latter and I have to create symlinks from /usr/local/bin to /usr/bin for each program I install.
It would be good even if it was possible to add that directory amongst the "environment paths" like in Windows.
Thanks for help.
To run programs from /usr/local/bin without typing their full path (e.g. /usr/local/bin/Prog_Name) you should add /usr/local/bin to your $PATH variable. For this you should edit your shell configuration file. For bash it will be .bashrc, for csh - .cshrc etc... Just add 2 following lines to that file

$PATH=/usr/local/bin/:/any/other/path/you/need/but/didnt/get/bydeafult/:$PATH

(and)

export PATH <--- this line should go last in your config


(place ":" to separate fields and put $PATH at the end for concatenate your previous $PATH settings with additional fields you've just inserted.) Correct syntax depends on the shell you're using. You will change current shell settings for the single user if you'll edit .bashrc (for bash) from its home directory. If you need global changes for all users who uses this shell you should edit system wide shell configs - if you're using csh - check /etc/csh.cshrc file for that.

However i have to say that /usr/local/bin should be included to the default $PATH variable. Check it first by "export" command in user's console. Maybe your problem is in wrong permissions.

wbr Gorthaur
Reply With Quote
  #3  
Old 10-02-2005, 01:03 PM
sblevin sblevin is offline
Senior Member
 
Join Date: Jun 2005
Location: Australia
Posts: 909
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Deviad, your problem sounds really ugly, as /usr/local/bin should be in your path. FreeBSD uses /usr/local/bin specifically for user installed programs, so if it's not in your path, you have a BAD problem.
Reply With Quote
  #4  
Old 10-02-2005, 01:40 PM
Deviad Deviad is offline
Junior Member
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: /usr/local/bin and /usr/bin
Originally Posted by Gorthaur
*
Thx for your help.
That's what I was looking for.
The problem solved itself, since yesterday I found out the shell wasn't bash, I grabbed it from pbidir.com and I installed that (version 3.0), but I didn't reboot till this morning.
Lucky the path was included, but I can't reach the file bashrc in /etc/, I'd be glad to know where it is for future modifies as I didn't find anything with find.
Reply With Quote
  #5  
Old 10-03-2005, 07:34 AM
Gorthaur Gorthaur is offline
Member
 
Join Date: Sep 2005
Location: Kiev, Ukraine
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Gorthaur
Default
Deviad, for global bash config look at /etc/profile.
If it isnt already there you can create it and then tune your global bash behavior by editing it.

wbr, Gorthaur
Reply With Quote
Reply

Thread Tools
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
pkg_add from a Local Directory kmf FreeBSD Help 7 09-08-2008 01:48 PM
symlink to /usr/local heatherval General Questions 10 05-28-2007 08:20 PM
Setting up a local CVS Server TerryP Guides 0 04-16-2007 10:47 PM
local cvsub Gerard Feature Requests 0 04-20-2006 07:27 AM
Local Area Network Ray General Questions 2 10-29-2005 06:21 AM


All times are GMT. The time now is 03:52 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.