Hello Gurus,
Can any one explain me the difference between /opt and /usr/local. When should we use them. Can we link with any directory in windows I mean similarity between unix and windows.
Hello Gurus,
Can any one explain me the difference between /opt and /usr/local. When should we use them. Can we link with any directory in windows I mean similarity between unix and windows.
The difference between /usr and /opt is the implementation of SVR4 file system paradigm...where from / you would separate static files layout from dynamic files layout...
/usr is where you expect to find OS libs binaries and documentation
/opt should be dedicated to applications...
You would have:
/opt/<appname>/bin
/opt/<appname>/lib
/opt/<appname>/share/man
conf files in /etc/opt/<appname>/ and logs in /var/opt/<appname>/
But why do we install some app in /usr/local/
/usr/local is where custom-built things usually go. On my system it's not used at all except for things I put there myself.
Because when some people don't get their way, they ignore standards:
rama krishna, it's not like one guy sat down and decided we needed both /usr/local and /opt. One group of people started using /opt and a second group of people started using /usr/local. In an effort to make everyone happy we now have both. People have been arguing about this for the past 25 years. Recent example: Point/Counterpoint - /opt vs. /usr/local | Linux Journal
It also helps that they're designed in ways that lend them to different uses. /usr/local/ usually contains a bin, sbin, lib, and so forth, so works well for small scripts, libraries, and the like while /opt/ tends to accumulate applications that've grown large enough to accumulate their own directory tree.
Thanks Gurus for all your answers.