Mac OS X: Terminal is Power

Welcome to Moof'in! This is the first true article of the series. Last week I wrote a teaser/informative article as an intro to get everyone excited about this new column. This week we are getting right to work.

This article will explain a little of the history behind Darwin and how Apple got into licensing Open Source software. For those of you who can't wait any longer to start pounding commands into Darwin, I also included some goodies to start playing with at the end of this article.

Apple has always been known for its groundbreaking ideas, highly revolutionized technologies, and industry guiding foresight. Way back in 1991, Apple started a long and extensive search to build "the perfect OS." At the time, the Mac system software was quickly evolving and had a lot of room for growth left. However, Apple knew it could not keep piling code on a foundation originally written to run on the Motorola 68000 microprocessor.

The Copland project is widely considered Apple's first attempt at creating a truly modern operating system. Copland was officially announced by Apple in February 1994. However, predecessors to Copland did exist, but they never grew up enough to be taken seriously. An example would be Pink-- which is a now defunct object-oriented Operating System, developed by IBM, that allowed IBM-compatible computers to look a lot like a Mac running System 7.

In January 1992, in a still pre-Copland era, Steve Jobs announced NeXTSTEP 3.0. Even though it didn't seem to shake the Mac community, or anyone else, NeXT's role in helping Apple would become more evident a half decade later.

With an uncontrollable Apple running amuck beneath him, then CEO Gil Amelio was a major player in the murder of Copland, in August 1996. After Copland's death, most of its technologies were absorbed into other projects. With Copland behind them, Apple proceeds to buy Jobs' NeXT in December '96.

For Apple, 1997 started out with a huge bang. Apple declared that Mac OS 7.6 would be the first part of their new OS strategy, which came out exactly 13 years after the original Macintosh. Also in January, Steve Jobs got his foot back in the door at Apple as an "advisor." Also as part of the NeXT deal, Jobs publicly announced the future of Rhapsody, Mac OS 8, Allegro, and Sonata, the Mac, NeXT, and Apple in general at the January '97 MacWorld Expo.

Jobs, now enveloping Apple with his newly returned presence, cranks up the heat on Gil Amelio and the Apple board. In July of '97 his masterminded efforts lead to the ousting of both then CEO Gil Amelio and VP Ellen Hancock. In late July, with Apple still fresh in the eye of the media, Mac OS 8 is released with a great fanfare. Then in August, his Steveness totally reclaimed Apple from those who banished him way back in 1985. In one swoop he went from "advisor" to "de facto head."

Later, in September '97, Jobs proclaimed himself interm-CEO. He would eventually drop the "intern" from his title once he knew Apple wasn't going to suddenly drop dead. In October, Apple finally got the Rhapsody Developer Release 1.0 out the door. At the time, Rhapsody was said to hold great promise for the computer industry.

Jobs wasn't slow to put the excellent software development team from NeXT, now at Apple, and prior Apple software developers to use. As Rhapsody progressed, Apple started changing the direction of their OS strategy. It turned out that something more mainstream and flexible would work better to power the core of their next-gen OS. Apple adopted the Mach Kernel, which is not only the most powerful and advanced kernel ever written, but is was also used in NeXTSTEP, and written by the extremely brilliant "Avie" Tevanian, Jr., who happened to be at Apple via the NeXT acquisition. As Apple fabricated plans for dumping the Rhapsody project and starting from the ground up with the Mach kernel, the public grew restless on what Apple was doing with their next generation OS.

Finally, on May 11, 1998, Apple publicly announced the plans for their next-generation OS that would actually make it to the public in one piece! The new operating system, Mac OS X, pronounced Mac Oh Ess ten, would be the long awaited savior. Mac users raved how the new OS would finally put the last nail in the coffin to whether Apple or Microsoft had the best operating system.

As the public buzzed about Apple's open source OS strategy, many die-hard Mac users were skeptical about Apple's plans. It seemed impossible that Apple could re-create, on an open source UNIX-like core, the same look and feel that has made the Mac special for the past 17 years.

Apple's new Mac OS X consists of several parts. First, at the center of the is the the industrial-strength Mach Kernel. The core operating system, named Darwin is open source, as to encourage development from the open source community. Using an open source UNIX-like OS also makes Mac OS X compatible with the vast amount of server software already available for UNIX. Apple can now include all the powerful features that they have only dreamed about in the past, such as preemptive multitasking, protected memory, rock solid stability, and sheer performance boost

Since Apple publicly announced it plans for Mac OS X, Darwin has undergone lots of work. If there is one aspect of an operating system that can either make it or break it in the real word, it has to be the core. Apple, being the kind of company that doesnít sell an OS with 57,000 known bugs, realized that a good core is important.

In March ë99, to aid progression and the developer base of the Darwin core, Apple became the first company to make a mainstream OS available to the open source community. This giant step made many computer savvy users, including myself, do a double take. For any major computer software player, such as Microsoft, Sun, or Oracle, to do something like that is unheard of. Of course, Apple being the underdog it is, did just that. After I thought abut it, Apple did a really smart thing. I hope other major companies catch on. For those of you who donít know what the definition of open source is, youíd better learn it now. I can guarantee youíll be hearing a lot about in the future.

According to WeboPedia (www.webopedia.com) Open Source is: ìA certification standard issued by the Open Source Initiative (OSI) that indicates that the source code of a computer program is made available free of charge to the general public...î
Basically that means that your software is free and you are also giving away the uncompiled code that makes up the software so programmers can play with it.

In the later half of the ë90s, the open source movement has especially picked up speed and popularity. Now, not only developers and programmers are using open source, but end users as well. Mac OS X has undoubtedly been a catalyst in acquainting ìthe rest of usî with open source, and the wonderful things it promises.

Since March ë99, Darwin has come a long ways. In May of ë99, Darwin 0.2 became available to developers as downloadable binaries from Apple. In June of ë99 Appleís Darwin was officially accepted into the elite BSD operating system family. April of 2000 brought along Darwin 1.0, which included early support for the Intel platform. More recent release of Darwin include it in Mac OS X beta and as an ISO image downloadable from Apple.

Even though Mac OS X has finally been released, as of March 24, 2001, Darwin is still under constant improvement. It will be exciting to see the most important part of Mac OS X evolve to fit our computing needs for decades to come.

Now that you know enough about the history of Darwin to actually understand where Apple is coming from, it is time to start playing with it... or I guess you can ìworkî in Darwin too. But even if Iím doing work on a Mac it seems like Iím playing. Just remember to have fun. Donít let this powerful core to scare you.

To get started, iíll tell you how to drop back to the Darwin command line when using Mac OS X If you have Darwin installed by itself (not with Mac OS X or any type of GUI), the commands will still work, you can just skip over the next paragraph.

To get direct access to Darwin in Mac OS X, youíll need to open the Terminal.app. This handy program, that Apple included with OS X, allows you to use the command line with out getting rid of Aqua (OS Xís graphical user interface) for good. The Terminal.app can be found in the /Applications/Utilities directory. When you open the Terminal.app you will be greeted with a command prompt. This might look familiar for those of you who have used DOS before. In DOS your prompt consists of ìC:î or whatever the letter of the drive you are accessing is. In Darwin, the prompt is ì%user:î. Where ìuserî represents the account name you are logged in as.

To get started, Iíll list a few commands, with descriptions, that you can try in Darwin. Enter the command as you see it and press the return key to give Darwin the command. Next week Iíll get into some more complicated commands and maybe install an app! Have fun with the commands and please e-mail me <sburrish@mac.com> with any questions or comments regarding this article or the ìMoofíinî column. Cya yaíll next week!


telnet

connect to another computer or server that you have a TelNet account setup with


emacs

create or edit text documents using the emacs text editor


mkdir

make a new directory


cd

change current directory


pine

easy to use mailer program


bc

a simple calculator program


cp

copy a file


mv

change the name of a file


ftp

open a connection to a FTP server to transfer files


passwd

change your password