Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-06-2004, 11:17 AM   #1
LQ Newbie
Registered: Oct 2004
Posts: 12

Rep: Reputation: 0
Where to install software /opt? or /usr/local?

I am wondering where I should install software at. Taking look at the the Fllesystem Hierarchy Standard site (, it has the following definitions:

/usr/local - for use by the system administrator when installing software locally.
/opt - reserved for the installation of add-on application software packages.

They both seem to say the samething, or are they?

Should I maybe put system type software (i.e. java runtime. mysql, etc.) into /usr/local and user specific software (open office, mp3 players, etc.) into /opt?

Let me know what you guys/girls think.


Old 11-06-2004, 11:24 AM   #2
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
I mount /usr/local to its own partition, and use it for all software that I compile from source. Most source packages install to /usr/local as default.

/opt is used by some distros, like Slackware, but not others (like Kanotix). Its use depends on your distro. Some distros will put self-contained packages (like Mozilla and OpenOffice) there; I believe Slack puts KDE and Gnome there too.

In the end, it doesn't really matter. Both locations are there for you to use so that user-installed software doesn't get mixed up with your distro-installed software.
Old 11-06-2004, 12:53 PM   #3
Registered: Mar 2004
Location: Pocatello, Idaho, USA
Distribution: Ubuntu
Posts: 256

Rep: Reputation: 30
I compile Software to my /usr/local/src and it works fine for me.
Old 11-08-2004, 04:09 AM   #4
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
/opt is for "self-contained" software. For example, you would install Netscape and Java there:

/opt/java2/bin, lib, doc...
/opt/netscape/bin, ...

Every file is inside /opt/name of program/. So you usually have to edit PATH.

/usr/local is for programs that follow the Unix structure (binaries in $prefix/bin, includes in $prefix/include...). Hence if the program you want to install is "Unix-compliant" and lets you choose the prefix, then you should install it in /usr/local.

That's the theory. Myself, I've found that programs installed in /usr/local are difficult to manage/upgrade/uninstall, because all files of all programs are together.
So I chose to do it "GoboLinux-like": I install the programs under /opt/program name/.
Example for Matchbox: I install it under prefix /opt/matchbox-0.8.4. As I see it, it is OK because then, the program *is* self-contained. And to make it work like if it were in /usr/local, I create symbolic links of everything under /opt/matchbox-0.8.4 from there to /usr/local. I end-up with links like that:
/usr/local/bin/matchbox-session -> /opt/matchbox-0.8.4/bin/matchbox-session

Old 08-24-2013, 12:22 AM   #5
LQ Newbie
Registered: Jul 2013
Location: United States
Posts: 16

Rep: Reputation: Disabled
If you install something, it usually goes into /usr/local/bin or, if it's an administrative application, /usr/local/sbin.
Sometimes you see extra applications in /opt. Any applications that come pre-installed with your OS, or installed by the OS
developer's pre-compiled repositories, will usually end up in /bin or /sbin.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
java does not install in opt but install in usr bbmak Linux - Software 6 10-03-2005 12:13 AM
/usr and /opt in 1 partition hottdogg Linux - General 6 08-16-2005 10:51 AM
/opt or /usr ? eeried Linux - Newbie 1 01-06-2005 05:49 AM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 10:21 AM
symlinking /opt to /usr/? [GOD]Anck Slackware 6 01-02-2004 12:03 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:33 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration