comparing Darwin to other unix varieties

capybara

Registered
i know unix real well - but am new to Darwin
so 4 stoooopid newbie questions pls:
1.is darwin posix (compatible with all the other unix
varieties like solaris, linux, hp-ux, etc)?
2. does darwin have apt-get or anything similar?
3. whereis darwin kept if i wanted to find and move some of its commands or add new commands to it?
if you enter $whereis darwin
what is the reply?
4. does darwin have any new commands i might not be familiar with
because there not ibn other unix varieties?
===================================
my first post here! w00t! :eek:)
 
1. darwin is not fully posix compliant, although it aims to be fairly posix compatible. at least this is the case a year ago.

2. install fink. it is a port of apt-get to darwin. its great.

3. i m not sure what you mean by, where is darwin kept. it resides on the hard drive. there is no command named 'darwin'.

4. there are a few commands that will only be found in darwin. like nvram, for modifying the apple open firmware, anything related to netinfo is darwin (and NeXT) only, so niutil, niload, nidump, nicl. anything appletalk related is darwin only, so AppleFileServer is the name of the process that serves AFP connections. the /etc/hostconfig file is a sort of central place for storing configurations. that is darwin only, as far as i know. also there are a few commands that deal with HFS peculiarities, like GetFileInfo, and some others i forget. those would be darwin only.

but darwin has the same shells as any other UNIX, so mostly all the commands are identical to any other UNIX. ever UNIX has its own idiosyncrasies, for dealing with the systems it runs on, and there are always commands that reflect this. Solaris and linux differ a fair amount in their command set. solaris doesn t have insmod, because the systems are different. those commands that i listed above as darwin only aren t likely to come up unless you need them.

my biggest surprise when starting with darwin was realizing that it doesn t use /etc configuration files for the most part. they are replaced by a directory service called NetInfo, that is at once more complicated and more powerful.
 
Darwin isn't technically posix but it's supposedly more so than OpenBSD which it's based on and most people consider OpenBSD to be pretty close.

I too am confused about where Darwin is kept. Aqua is built on top of Darwin, so the whole system is Darwin, just with a shiny face.
 
Well, Darwin is kept in lots of places. The XNU kernel is kept under the root (mach_kernel). Most of the command line commands are kept in the usual places (that is, /bin, /sbin, /usr/bin, /usr/sbin, etc.) And there are some 'Frameworks' (like the I/O Kit) which are kept in /System/Library/Frameworks. Framworks are a Darwin specific thing ... sets of headers / libraries that are bundled according to a specific purpose into something called a Framework. To the Finder (similar to MS Windows' Explorer if you're not familiar with Mac OS) a 'Framework' will look like a file, but under the CLI you see it for what it is - a directory structured in a certain way with certain files in it. Anyway - if you're really interested in that, you should check out the developer docs ...

Hope that helps.

C
 
Back
Top