[AUUG-Talk]: Solaris Filesystem Hierarchies...Questions / Musings...

Glenn Satchell Glenn.Satchell at uniq.com.au
Sat Nov 18 23:58:52 EST 2006


>Date: Sat, 18 Nov 2006 14:01:56 +1030
>From: David Lloyd <lloy0076 at adam.com.au>
>To: talk at auug.org.au
>Subject: [AUUG-Talk]: Solaris Filesystem Hierarchies...Questions / Musings...
>
>
>Hi There,

I hope I don't sound like an apologist for Sun, but I'll try a few answers.

>I'm currently using Open Solaris ON, which I'll refer to as just ON (1). 
>I've migrated from Linux and am used to Linux's general filesystem 
>hierarchy and in specific Debian GNU/Linux and RedHat hierarchies.
>
>One thing that I have noticed about ON is that there's a stupendous 
>amount of locations where a binary might be lurking:
>
>  * The usual: /bin, /sbin, /usr/bin, /usr/sbin
>  * Then: /usr/local/bin, /usr/local/sbin

Solaris doesn't use /usr/local for anything, but you might. It is
for third party and self compiled stuff.

>  * /usr/perl5/bin

All the Solaris perl scripts use these directories to access a common
version of perl, but there is a link in /usr/bin/perl, or you can
replace that with your own perl without breaking all the perl system
scripts.

>  * /usr/java/bin
>  * /usr/jdk [with 3 bin directories]
>  * /usr/xpg4/bin
>  * /usr/xpg6/bin

Standards, standards, standards :)

>  * /usr/ucb/

This was historical when Solaris 2.0 first came out to allow commands
that behaved like the old SunOS 4.x BSD versions.

>  * /usr/sfw/bin
>  * /usr/sfw/sbin

These two are for open source commands that Solaris includes, but is not
supported by Sun.

>  * /usr/staroffice7/program

The one you probably most care about, soffice, is in /usr/bin

>  * /usr/X11/bin
>  * /usr/openwin/bin
   * /usr/dt/bin

Openwindows is where Sun historically put the X server. this goes back
anout 20 years. CDE lives in /usr/dt. The gnome stuff is in /usr/bin
fortunately.
>
>I sense I've missed some out, however that's at least 19 locations on my 
>   system where a binary *might* be. The above is fairly much from a 
>full install from an ON consolidation.

   * /usr/apache/bin
   * /usr/apache2/bin

The two different versions of Apache...

   * /usr/proc/bin

Historical, but sensibly these files are all linked into /usr/bin since
about Solaris 8.

>I might add that if one installs extra official packages, such as Sun 
>Studio, you'll often find that they contain their own directories.
>
>To make my command line experience as seemless as possible [read: I can 
>do what I'm used to doing], I have between 8-12 different locations in 
>my PATH variable.

MANPATH is the one that gets tricky if you want to know how to use all
those commands :)

>Most of the GNU/Linux distributions seem to have much less binary 
>locations and tend to put most things in /usr/bin or /usr/local/bin. 
> From what I have seen of FreeBSD, there seems to a the same philosophy.

I'd hope they don't put anything in /usr/local/bin - that's where I
want to put *my* things that are not supplied with the OS.

>I suspect the reason why everything seems all over the place to me is that:
>
>1. I'm steeped in the GNU/Linux mindset
>2. ...and a little in the FreeBSD mindset
>
>So, I guess I'm asking:
>
>1. Is it just me or does Solaris put things all over the place?
>2. If it does put things all over the place, is that because of backward
>    compability issues?

A lot is historical, especially coming from the SVR4 background. Bloody
committee design trying to please everybody and blend a whole bunch of
different systems together without making it too different from
previous operating systems.

I think Linux benefited from the clean slate and a well defined FS
heirachy from fairly early in it's life.

regards,
-glenn



More information about the Talk mailing list