LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-25-2011, 09:01 AM   #1
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Rep: Reputation: 107Reputation: 107
putting binaries in /opt and then running them from terminal from any directory?


Just a quick question I had. If I manually put some precompiled binaries in /opt, how do I make it to where I can run the binaries by simply typing the name from whatever directory I happen to be in?

I was thinking it might be ln filename /usr/bin/ , but I didn't know what options I needed to give it.
 
Old 11-25-2011, 09:11 AM   #2
trappa01
LQ Newbie
 
Registered: Dec 2009
Posts: 20

Rep: Reputation: 8
Just add /opt to your current PATH variable:

Code:
export PATH=$PATH:/opt
you should add this to your profile for it to be run at login.
 
Old 11-25-2011, 09:13 AM   #3
kbscores
Member
 
Registered: Oct 2011
Location: USA
Distribution: Red Hat
Posts: 259
Blog Entries: 9

Rep: Reputation: 32
Creating soft links in /usr/bin or /bin would be one idea. Best practices would recommend putting the softlink or you could add whatever directory you are using to the path.
 
  


Reply



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
Cannot access software installed in /opt/ directory...why? anjanu Linux - Software 7 09-28-2011 04:51 AM
Newbie as they come and how do I get an ansic directory to appear in /opt hpux2Linux Linux - Newbie 6 07-14-2009 04:00 PM
Use of the /opt directory - Suse 9.2 swamprat Linux - Software 2 02-17-2006 03:42 PM
regarding /opt directory... zameer_india Linux - Newbie 2 01-19-2005 12:48 AM
OPT INITRD Directory Purpose(s)? Needed? Outabux Debian 1 10-05-2004 10:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:19 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
Open Source Consulting | Domain Registration