Slashdot Mirror


How Unix-like is MacOS X?

prospective_user asks: "I am a heavy user of Unix, spend most of my time running Linux and am considering getting myself an iBook, after seeing a considerable amount of exposure Macs/Apple have in both Slashdot and the O'Reilly Network. Given that MacOS X is based on FreeBSD/Mach, I suppose that the usual Unix libraries and environments (like ncurses and tcl/tk) are available in MacOS X (which I hope is true, for text-based applications). In fact, I'm concerned about the Unix side of MacOS X and also plan on running Debian/PPC on it, but I plan to primarily use MacOS X. So, before having an (uncertain) investment in a new platform, it would be reasonable to have a bit more of background on it and thus, the questions: how well does MacOS X support traditional Unix applications? For instance, how do the following applications run under MacOS X (which I use the most): teTeX, GNU Emacs, mutt and fetchmail?" Note that the submittor isn't asking if OSX is or is not a Unix; we've fielded that question already. No, the question here is where does OSX differ from the other unicies.

"Also regarding the investment in a new platform and coming from the x86 world, I'm a bit interested about the PowerPC performance in comparison to what I could get with a x86 notebook. I've read some articles and pages that suggest that PowerPCs may not be fast (or, in fact, may be quite slower than their x86 counterparts):

Some of the sources I've read are: these pages, from D. J. Bernsteins's website, and this article on processor performance from the GMP website.

Also, as some later questions, can the portable Macs be plugged to non-mac monitors? And does MacOS X feature a packet filter like Linux or other BSDs do?

Any comments and experiences with these machines are welcome. Thanks."

15 of 128 comments (clear)

  1. Not very Unixlike at all, I'm afraid. by Starship+Trooper · · Score: 4, Troll
    I too looked forward to the day my iBook came when I ordered. I would no longer have to sift through the duality of Linux's raw power and Windows' ubiquity and application support: I would have the best of both worlds! When I first plugged the iBook in and eagerly opened Terminal.app, I was pleased to be greeted by the lovely '%' tcsh prompt. 'ls' worked. 'du' worked. 'ifconfig' worked. Even "find . -name *.c -exec grep -l '{}' ';'" worked!

    But as I dug deeper, the initial euphoria wore off. While MacOS X gives the impression of being a Unix, as one digs deeper into the system, it becomes more and more clear that it is anything but Unix:

    • No /etc. Well, technically, there is a /etc, but it is incredibly empty compared to what you may be used to in FreeBSD or Linux. None of the system's configuration is included in standard POSIX text files; Apple has opted to move everything into what they call a "NetInfo" registry. This is awful, to say the least. Obviously, Apple has failed to learn anything from the problems Microsoft's reliance on a central registry have propagated, and it wasn't long before I ended up having to reinstall MacOS X due to a corruption of the NetInfo database.
    • Not everything is a file. MacOS X violates this essential tenet of the Unix interface by hiding the implementation of several core functions such as keyboard and mouse I/O behind a "CoreGraphics" ObjC library. There is no /dev/mouse or /dev/kbd or any of the easy-to-use device nodes I've grown accustomed to coding for on Linux.
    • Everything above the Unix layer is proprietary. The Unix world on MacOS X is completely separate from the GUI world. The Unix directories are completely hidden from the Finder, and likewise one cannot start GUI apps from the console. There is none of the tight CLI-GUI integration seen in AmigaOS or BeOS or even Windows.
    If you're looking for Unix, I suggest you make room on your iBook's drive for Linux, which runs very well on Mac hardware, and is much faster than MacOS X to boot. I'm afraid all of MacOS X's vaunted Unixness is little more than FUD.
    --
    Loneliness is a power that we possess to give or take away forever
    1. Re:Not very Unixlike at all, I'm afraid. by self+assembled+struc · · Score: 5, Informative

      Actually, you can open up GUI apps from the console.

      try "man open" at the command prompt.

      and from what the guy was asking originally, i've had no problems running GNU software. I got BASH to compile and set it up as default shell, i've gotten VI to compile, and GNU Emacs seems to run just fine (even m-x tetris is available).

      The CLI is a different world from the GUI, but you can turn on all most options to allow the finder to see hidden directories, the whole nine yards. Check out some Mac tip and trick sites...Admittedly it's not default in the OS and you have to peek around, but come on, y'all like UNIX, so why get lazy about learning the tricks of this system.

    2. Re:Not very Unixlike at all, I'm afraid. by foobar104 · · Score: 5, Interesting

      I'm afraid all of MacOS X's vaunted Unixness is little more than FUD.

      OS X is based on Darwin, which is a full-fledged Unix kernel that complies with every relevant standard: POSIX, XPG, you name it. Because of this fact, software written within those standards compiles and runs with no problems.

      Just this morning I wanted to download some big ISOs to my iMac at home while I was away; why waste that expensive DSL line just 'cause I'm not at home? So I logged in to my iMac with SSH and used NcFTP to download the source code for GNU Screen from the GNU FTP site. Then it was "configure && make && sudo make install." At that point, I was able to run "screen" and use a detached terminal session from the office to download my ISOs.

      If that's not pretty damn Unix-like, I don't know what is.

      Of course, that doesn't mean OS X is just like Solaris, or HP-UX, or IRIX, or FreeBSD, or Linux any more than those OSs are all like each other. The definition of "Unix-like" is defined by a set of standards, and OS X meets 'em.

      You're talking about how different OS X is from your expectations, not how it fits the definition of "Unix." They're not the same thing.

      Also, I don't think "FUD" means what you think it means.

    3. Re:Not very Unixlike at all, I'm afraid. by Dr.+Sp0ng · · Score: 5, Interesting

      The Unix directories are completely hidden from the Finder

      No they're not. There's an option - it MAY be "Show hidden files" or something to that effect, but I'm pretty sure it's not. I'm not at my OS X box right now so I can't check. It can be done, though.

      Now, as for your gripes about /etc, all I can say is THANK GOD! OS X is great for one reason only - they took Unix, dumped all the crap, and kept all the good stuff. It's Unix, how it was meant to be done. No more worrying about hundreds of apps, each with their own configuration mechanism - it all goes through Apple's (NeXT's) APIs and is stored as XML.

      and likewise one cannot start GUI apps from the console.

      Try the "open" command.

    4. Re:Not very Unixlike at all, I'm afraid. by Wakko+Warner · · Score: 4, Insightful

      No /etc. Well, technically, there is a /etc, but it is incredibly empty compared to what you may be used to in FreeBSD or Linux. None of the system's configuration is included in standard POSIX text files; Apple has opted to move everything into what they call a "NetInfo" registry. This is awful, to say the least.

      Why is this a bad idea? The concept of a system registry is fantastic in theory; in practice, on Microsoft's operating systems, it is a trainwreck. Why must Apple's attempt immediately be classified as such, as well? Do you honestly think managing 100 different little config files in /etc, each with its own syntax and gotchas, is somehow more elegant than a registry-based solution? The registry is something I wish some Linux distro would get around to doing, to be honest, and one of the few good ideas Microsoft has ever had.

      - A.P.

      --
      "Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
    5. Re:Not very Unixlike at all, I'm afraid. by Chanc_Gorkon · · Score: 4, Interesting

      I agree with you. For that matter, AIX (which is a UNIX for all intents and purposes....) does something similar with it's implementation of UNIX. All AIX config is done in SMITTY or SMIT (both GUI and a ASCII terminal driven) and all config is stored in the ODM Database. Sure, you can make changes and changes that work to the standard /etc text files, but those changes are lost when you reboot/IPL. I believe IBM still calls a reboot an IPL even under AIX....amazing how many mainframish like things are throughout AIX....program fixes are called PTF's in both AIX, OS/390 (or whatever MVS is now called) and DOS/VSE. In any case, who gives a crap where thigns are stored/configged? I mean even the Linux guys can't all decide on where to store what. Desktops do they go in /usr or /opt? GRUB stores it's config in /boot/grub/menu.lst .....LILO stores it's info in /etc/lilo.conf. Grub you can make a change and reboot. Lilo you must run lilo after updating a kernel or get lilililiii. The things that makes a machine UNIX like, to me, is how you interface with it and not how close to a "standard" which doesn't really seem to exist between even true UNIX machines. Can you SSH into a OSX based machine and run tcsh/bash/ksh or whatever and then run a text based FTP client and download source, compile it, then do whetever and as another poster already said, run it. You can. You can download just abut any Linux source code and get it to compile (well, that's what I have heard anyway.....). Sure, a Carbonized or Cocoa app looks great and may not be a true "UNIX" type of app, but what about a GNOME or KDE app? Are they more UNIXy? I think not.

      --

      Gorkman

  2. The difference between MacOS X and Linux by Adrian+Voinea · · Score: 4, Interesting

    Linux is great for what it is. Linux is a swiss army knife. It is most things to most people. There's nothing it wont do if you're willing to put forth the effort to use what's there. In itself that's a wonderful design philosophy. I've been using Linux for a long time and it amazes me what it can do when people put their minds to it. Gearheads love this sort of OS, and love to demonstrate it's ability to perform any function no matter how arcane or bizarre the procedure to get there is. The people who build Linux are pragmatists. Soured by years of lofty goals, but failed implementations, they work to make a system that solves all the problems, even if they have to compromise usability, simplicity, or advanced design. Efficiency is stressed at the system level. I've never encountered a general purpose computing task that could not be solved by Linux.

    MacOS X on the other hand is more like a perfectly ergonomic, intuitivley simple yet surprisingly flexible single bladed knife. It doesn't have a corkscrew or scissors, But the handle grip doubles as a file and it is perfectly balanced along every axis. Ninjas use it for throwing, Butchers use it for cutting meat. Carpenters use it to score material and Master chefs use it to prepare dishes, but you wont be able to open a wine bottle, it wont loosen most phillips screws and you'll just make a mess if you try to open a can of peas or bottle of beer with it. It also wont fit in your pocket. However, if there was ever a knife that was a perfect balance of asthetics, utility, and well executed engineering, this is it. Again, a wonderful design philosophy.

  3. "Mac Monitors" by green+pizza · · Score: 4, Informative

    Apple's desktops have offered a generic, common, plain SVGA HD-15 connector since the first blue&white G3's several years ago. Almost every single PC monitor will work on a blue&white G3 or silver/graphite G4 without any sort of adapter.

    However, older macs used a DB-15 (two rows of pins rather than three rows) connector for the monitor. These require a $10 - $30 adapter to offer the proper connector and pin routing if a PC monitor is to be used.

    All current Apple monitors use ADC, the Apple Display Connector... a single cable that carries power, signal, and usb to the montior. ADC is based on some obscure standard that nobody else adopted. Macs with ADC have a second alternate connector for SVGA HD15, but only one connector can be used at a time.

    The PowerBook G4 has a SVGA HD15 monitor connector.

    The iBook has a funky monitor connector, but a SVGA HD15 adapter is included.

    Current desktop Macs have both SVGA HD15 and ADC connectors on their gfx cards. An ADC -> DVI adapter is included for use with a DVI flat panel. (Should you choose not to buy an Apple flat panel). THough, I have been told by more than one person that they had to buy the ADC -> DVI adapter as it's not included with all new G4s. Go figure.

    Hope this helps.

  4. Yes, it's a unix by zhobson · · Score: 5, Informative
    I am a long-time unix user (first Linux, then FreeBSD) who recently decided to buy my first Mac, a low-end iBook. I'm running Mac OS X on it exclusively (I despise the old Mac OS).

    It runs nearly all of my favorite open source unix apps, including the X applications. I am personally using mutt, gvim (that's vim with the GTK frontend), nethack and a few others. I like the new operating system very much, and even though bits of it don't look like unix, that's usually because they're NeXTish instead.

    It's also probably reelevant to mention that the GNUstep libraries are mostly source-compatible with Apple's Cocoa API, so you can compile GNUstep apps and they'll work just like "native" OS X apps. Plus the development tools are all completely free (unlike the other major commercial desktop OS).

  5. Same complaints, 12 years later. by green+pizza · · Score: 5, Informative

    These are the exact same complaints aired in 1988 when the first NeXT machines shipped with NeXTstep 1.0. I agree with everything you've said. But keep in mind, Mac OS X is its own funky flavor of unix for a reason. I just wish NetInfo was optional. NI is a dream on a large NI network (I used to help admin 320 NeXTstations across our Math department), but it's a pain for someone that doesn't need its offerings.

    Ignorance or Evolution? It's hard to say. But I can tell you I've been happy with Mac OS X thus far. Final Cut Pro 3.0 works perfectly. My digital cameras (USB still photo and FireWire MiniDV) integrate fine. OmniWeb 4.1 is looking to be a great new browser (plans for 4.2/5.0 are sounding awesome). And yet I can still run all of the goodies I'm accustom to on my Sun and my Linux box.

    That said, OS X is not for someone who wants Linux in the first place. If you want the X Window System, if you want GTK or Qt, if you want GNOME/KDE/etc... do yourself a favor and build a Linux box. Running these under OS X is possible, but a kluge.

    Mac OS X is a whole new world. Learn its ways and tools, compute with peace.

    Hope this helps.

  6. Whether OS X seems like Unix or not depends on you by alangmead · · Score: 5, Informative

    Whether you call it Unix at all depends on your definition. Depending
    on whether you look at OSX from a kernel perspective, as a development
    platform, a unix user, or a unix administrator, it can vary between
    being a "true unix" to something very foreign.

    It most looks like unix if look at a system call interface (aka
    section 2 of the man pages. Things like open, read, write, close,
    fork, and exec). The user commands (section 1 of the man pages. Things
    like ls,cp, and rm) exist but all of /bin, /sbin, and /usr are
    entirely hidden from the GUI. For actual user commands, they are in
    some ways rather spartan (traditional BSD versions, not all-singing,
    all-dancing GNU versions.) but there are some rather interesting
    additions (emacs, tcsh, pico, gcc, autoconf, and gnu tar.)

    Standard Unix system libraries (section 3 of the man pages
    fopen,fread,printf,system,and popen) exist as a "non-preferred"
    interface. The command line utilities are built against them, but
    building an arbitrary tarball developed under linux might show some
    compatiblity quirks. (those same quirks might exist trying to port to
    FreeBSD) Most of the file and process oriented tasks can be done in
    the OS X specific libraries with an API entirely unlike the POSIX ones
    in libc. (This isn't anything new really, these OS X libraries are the
    updated versions of what came with the first NextStations in 1987.)
    Shared libraries are somewhat different than what probably currently
    exists in FreeBSD. I bet it started because NeXT implemented shared
    libraries before the became standard in BSD, but they need to continue
    their own system because it hooks into the object oriented IPC
    framework that is much of what the makes the system interesting.

    From a system administrators standpoint (I guess to keep my analogies,
    section 4 (device files) and section 5 (configuration files)) things
    are radically different. /etc/passwd is essentially a stub. There is
    no /etc/inittab. There are few useful things in /usr/lib, /usr/share,
    /var, or /etc, but /Library and /System/Library are full of goodies
    (like /System/Library/Perl and /System/Library/OpenSSL). There is no
    /home, instead there is /Users (which through some automount magic
    merges /Network/Users with the local /Users) Again, this system is
    inherited from NeXT.

    As a user, its a modern mouse and windows type of system. Its slightly
    more interapplication oriented, less monolithic application oriented.

    Like my friends who used NeXT systems in the past, there seem to be
    two ways to deal with the system peculiarities. The first is to assume
    that the system is a very stripped down Unix system, ignore whats in
    /Library and /System/Library and build your own
    /usr/local/{bin,lib,share}. The other way is to buy into its
    weirdness.

  7. Re:"Mac Monitors" (ADC) by helixblue · · Score: 4, Informative

    As far as the ADC based on some obscure standard. All ADC is DVI+USB+power. You buy a splitter if you need one.

    I myself have a 22" Apple Cinema Display DVI model.. so I bought a combiner that takes the DVI+USB+Power and makes it into ADC.

    I'll admit, ADC isn't the norm (though you can buy PC video cards with ADC connectors).. but it's not a half bad idea to take the 3 connections from the monitor and combine it.

    It's just nothing wildly proprietary.

  8. Re:Unix or not... by foobar104 · · Score: 5, Insightful

    (Score:-1, Offtopic)

    The titanium powerbook is an awesome piece of kit. Shame on those that don't have one.

    Yes, the Ti PowerBook has a lot going for it. Yup, it's thinner than thin. Uh-huh, beautiful screen. Ooh, built-in Gigabit Ethernet. Pretty fast, too, and it comes with a combo DVD-ROM/CD-RW. Hard to beat.

    But it's not perfect. To install an AirPort card, you have to skin it completely. And the sexy titanium skin is so thin, it scratches and dents very easily. And titanium is one of the most conductive metals on the periodic table; after an hour, the bottom of the laptop gets hot enough to make your thighs and the palms of your hands really uncomfortable. The joke going around the office after we bought ours was that Apple was planning to make the next one out of copper.

    It's an awesome laptop, but in my opinion it's just a little bit too delicate. I love my iBook. I throw it in my backpack and hit the road. Over $1,000 cheaper, too.

  9. My experiences in MacOS as a Unix desktop by Panix · · Score: 4, Interesting

    I am a long time Linux and UNIX user. I began running Linux exclusively fairly early in its life cycle, and thus I require a nice UNIX environment for my day to day life.

    About 3 weeks ago, I purchased an Apple Titanium PowerBook G4 with the intent of installing Linux on it. Since then, my experiences with OS X have made me reconsider.

    I started out quite skeptical, but was pleasantly surprised to find many of my favorite Linux/UNIX applications available. Step 1 was to install Fink. Fink is a source and binary distribution of UNIX applications and utilities for OS X. I installed it quickly, and was able to use the debian-like commands (apt-get install!) to get Python, rootless XFree86, and bash installed. Fink can be found at http://fink.sourceforge.net.

    Since then, I have grown used to the excellent environment that they have built, Its very refreshing to see such a usable and powerful desktop environment based around a standard UNIX kernel!

    Now, there are some caveats. Some of the standard locations for things don't make sense. For example, the /etc/hosts file exists, but does not appear to be used. Instead, you must use Apple's NetInfo manager. Additionally, the base compiler's supplied with Apple's developer tools have some differences that make porting a little bit interesting. Overall though, its a great UNIX environment.

    I am extremely happy with the UNIX side of Mac OS X, but I am equally impressed with the amazing usability and cool technology of Aqua and Quartz. Very cool stuff.

    If you have any questions about my experience, feel free to post them here and I will do my best to respond.

  10. Re:These questions are getting old... by Daniel+Dvorkin · · Score: 4, Insightful

    Give people the benefit of the doubt, okay? I've never written an Ask Slashdot without thoroughly checking out all the other resources I can find, and there's no reason to believe that other posters don't do the same. The whole idea of Ask Slashdot is for users to benefit from the knowledge of the community -- which is supposed to be one of Unix's strengths. The "RTFM" attitude is helpful to nobody. Remember, what goes around, comes around.

    --
    The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.