Learning Unix for Mac OS X Panther
This book focuses on those of us in the Mac OS professional world who have become Unix system admins by default with the introduction of OS X, and could stand to have a handy UNIX reference nearby, particularly if the Finder freezes in Apple's latest version of their BSD/OpenStep blend of a UNIX operating system.
As the authors explain in the book, the best justification for understanding and using the UNIX components present is Mac OS X is the same as in any other UNIX-family operating system: power and control. The Finder (Mac OS X's graphical desktop manager) can't do everything, so this book provides information to help power users and technicians resolve issues, install software, or create an optimized experience, all through the Terminal.
Chapters 1 and 2 provide a very helpful tutorial on the Mac OS X Terminal application, from showing the benefits of customizing the Terminal, the concept of shells, UNIX command syntax, and other obscure but useful settings that strengthen the power of the application when accessing the BSD innards of Mac OS X. Arguably, these two chapters are the strongest guide on Mac OS X's Terminal application (as it relates to its UNIX roots) that I have seen in any Mac OS X book to date.
Chapters 3 and 4 handle understanding of the UNIX filesystem, administration and superuser access, privileges, handling external volumes, file and directory names and the like. Mac OS X, while a BSD at heart, doesn't map out everything in a traditional UNIX-style directory format--at least, not from the Finder's view. Through the Terminal, a user can see the underlying, otherwise-hidden UNIX directories. The authors go through some basic but very helpful situations such as changing file and owner permissions, which can be changed from the Finder with greater ease in Panther, but not with the same finesse as done from a command line.
The file management chapter moves readers through the classic commands for moving, editing, and copying files from the command line, which can be very helpful for administrators of Mac OS X systems who must attempt repairs by SSH, for instance, and don't have access to the usual graphical elements that generally make Mac OS usage so easy. The authors don't pick sides in the vi vs. pico debate, and just offer the basic instructions on how to use either for your editing.
The book continues with the same level of complexity that local system admins or power users require in issues such as printing via CUPS, handling processes that the Finder doesn't show, using the X11 application, using Fink (a Debian-style installation application) installing OpenOffice and GIMP, using FTP and secure shell, using Pine and Lynx, and more.
For a book of just 168 pages, the authors pack quite a bit on making a Mac OS X system work from its Terminal roots. New Mac OS X system administrators will find this book most useful, particularly if their UNIX experience is lacking or radically different from what Mac OS X presents. Experienced *NIX users who bought a new Mac may find the book a good intermediary to demonstrate how Mac OS X Panther differs from the *NIX boxen they've used in the past.
You can purchase Learning Unix for Mac OS X Panther from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
The Finder (Mac OS X's graphical desktop manager) can't do everything...
"Yes it can."
-Steve Jobs
For people used to a one button mouse? Puuuh-leeez. ;)
If you don't know what a command does, type "man [command]" (without the quotes, of course).
Strange women lying in ponds distributing swords is no basis for a system of government.
I am a *nix admin and I have several friends that are OS X users that want to take advantage of the terminal/BSD side of the operating system. I am going to recommend this to all of them.
Evolution or ID?
man man
man cd
man pwd
man ls
man cp
man mv
man rm
man chmod
man more
man ps
man rm
man chmod
man more
man head
man tail
man grep
man passwd
Knock yourself out.
Anybody who knows enough about panther to enable the root account and login to a shell with that user, will know better than to enter that command line.
-dewhite
That's a new one to me. I must find some pico users to have flamewars with over that one...
I've gotten a shiny new iMac with OS X.3 on it, and I'm still learning the ropes. I'm slightly amazed at all the wierdnesses I can do with it, you can script almost anything with Applescript, and there's a million little details that do wierd shit, or behave as I'm not used to. So where is the Learning Mac OS X for the unix geek? The unix and mac world is so divided on the machine, yet works together seemlessly.
I haven't had my coffee yet, I'll ramble on about my experiences with Mac OS X elsewhere. But my question remains: what are good books/resources for the person who is already a unix geek?
Using the Mac OS X Terminal (HTML) or Using the Mac OS X Terminal (PDF)
Consensus is good, but informed dictatorship is better
I use nano, and I flame the pico users!
I've seen a few of these introductory unix books for Mac admins, but what if you need something more? If you have trouble configuring Apache, the Apache website doesn't help much because OS X has files in different locations. I know how to use ls... does this or any other book get into a deeper level?
I recall being at an Apple seminar once where they had demo of a then preproduction version of MacOS X. The audience consisted of local Mac support techies as well as casual users. There were many glitches throughout the demo, and many explanations from the presenter as to why MacOS loaded so slowly etc etc. He used this time to explain to the audience that the MacOS kernel is based on Unix. I wasn't sure at the time how many people in the audience would grasp that concept, but it became painfully clear near the end of the presentation when he finished things off by opening up a terminal window. I looked around and saw nothing but stunned, confused looks on people's faces. The presenter followed by explaining how you could now use familiar unix applications like telnet and vi all within MacOS X. After then explaining to someones question regarding just what telnet and vi were, someone else followed with the question, "So...if someone on the Internet wanted to hack my computer, could they open up one of these 'terminals' and use 'telnet' to hack into my Mac?". Needless to say the presentation ended late that day, and I got the impression most of the audience left feeling rather uncertain about what just happened.
I think a Unix for MacOS publication would be useful for those migrating to Apple from some (any) other platform. For casual Mac users? No way is this going to be of any use to them. If they were so inclined, they'd already have some experience on another OS by now.
www.brownsauce.org
Are you saying that Mac users can't learn like PC owners? That they are stuck in their ways and cannot expand their horizons?
I am sorry, but I find this is not the case.
... Macolytes who have a use for the command-line can really use GeekTool to improve their quality of life. See this picture for an example of its GUI goodness.
Okay, okay, so it's sitting there just churning the CPU. But it looks cool enough to get me chicks, so I figured you guys could use it too.
I'm not normally an irrational zealous dickhead, but I figure "When in Rome..."
I think it's important that MAC OS X users learn to use the UNIX command line. Even if they don't like it, they need to respect it. If it wasn't for OS X being powered by UNIX, it would not be anywhere near as stable as it is right now. I'm not "dissing" OS X, because I use it and love it, but any user shouldn't be without the knowledge required to run the UNIX command line.
Essentially, anyone that uses MAC OS X (if they don't already) will see the power of BSD and UNIX and general.. and will maybe move their PCs (unless they have MAC only) from Windows to a variation of UNIX, such as BSD or Linux.
"Instant gratification takes too long." - Carrie Fisher
My fondness for 4-alarm chili and stout doesn't prevent me from also enjoying a carrot and watercress salad with white wine.
http://alternatives.rzero.com/
Right on! Now, why are there two buttons on my mouse? I don't know which one to click!!!!
so is NFS...
Did you have them memorized or did you actually call the numbers in a /. post?
I'm an experienced *NIX admin who just got his first Mac (a Powerbook, and I'm hooked), and I'm struggling through what exactly *does* and *doesn't* translate from BSD to OS-X 10.3. I'd love to see a book that covers - to some degree - the differences. Anyone have a recommendation? Perhaps this book will be a close fit...
akad0nric0
This sentence no verb.
man woman
got a light?
how would you describe George W. Bush's idiocy?
Make sure to type them verbatim, including all punctuation, hitting return after each one.
The CB App. What's your 20?
Troll? The funny thing is, this is actually true! If you've used OS X, and tried to do some fun CLI stuff like yr used to, you'll realize it. Sure, it can be fixed, but it should all work; it would if Appl would have stuck with convention instead of /Applications /Users and so on...
This is one of my pet peeves. "Mac" is not an acronym, people! It's short for "Macintosh."
Now all those users who switched from the PC to the Mac because it was easier to use can have the one thing that the original Mac OS couldn't deliver: a DOS-like command line interface!
Anyone who can't "locate httpd.conf" and find it in /private/etc/ probably shouldn't be mucking around in the file anyhow. Aside from the location of the config file, it's all the same. Of course most folks will be using the default binary, but rolling your own is pretty trivial using the included developer tools.
It's only after years of experience with other operating systems, other computers, that I made the decision to switch to a Mac. Mac users I find can be very technical, just 'differently technical'. Technical doesn't mean "knows *nix". Maybe here, but not in the rest of the big wide world. . .
Geez..
Can't have people going around with Unix machines without knowing how to mount their drives.
Curious about other writing I've done? There's some useful free info online at 404 error page, particularly for Apache admins, and another book that slashdotters will appreciate is my Wicked Cool Shell Scripts. And, yes, Virginia, the latter includes specific scripts for Mac OS X too.
It's a troll because it isn't backed up. If the poster had specified which tools didn't work, it would either be marked as informative or replies could correct it. Since their are BSD and GNU tools that are known to work in Darwin/OSX, one must provide proof of the contrary or accept a Troll moderation.
R: That voice. Where have I heard that voice before? B: In about 365 other episodes. But I don't know who it is either.
Well, the thing is, Apple didn't write most of the man pages. And you'll find some little oddities -- like daemons starting up from rc that are calling flags not mentioned in the Apple supplied man pages. [eg, syslogd -s]
The real problem comes from all of those commands that apple has so kindly added and didn't bother to create man pages for. Stuff like 'disktool' and 'scselect'. Disktool gives some usage info when you call it...scselect, well...
And how many others are there out there that people haven't yet documented? [those two were mentioned in MacOS X for Unix Geeks, but I've found others that I can't recall off the top of my head that were recommended to run on webpages for configuration changes, that I just can't find documentation for]
Build it, and they will come^Hplain.
Troll? The funny thing is, this is actually true! If you've used OS X, and tried to do some fun CLI stuff like yr used to, you'll realize it. Sure, it can be fixed, but it should all work; it would if Appl would have stuck with convention instead of /Applications /Users and so on...
/Applications, and there's nothing wrong with using /Users instead of /home as long as getpwnam(3) works - if you're hard-coding that, you suck ass. Sure, there are conventions Apple chose not to follow, such as SysV-style init scripts; bitch about that if you want, but don't complain about non-issues.
You're also a troll. There is no CLI stuff under
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
Just so you know, the convention of /Applilcations and /Users is from NeXT, and makes logical sense when you think about it. All the unix tools are located in their standard directories (/usr/bin etc etc) but a good chunk of users aren't going to use them, they're going to use their GUI apps and such. Why would you want to put all your terminal apps in the same folder that your GUI apps are?
/usr/bin, if I added them to my Applications folder, I'd have 700 items in my folder. Now as a (hypotheticaly) non CLI familiar user, why would I want to have 700 items in my folder where I put my programs when I don't use most of them? I wouldn't. So maybe I might start deleteing them, or maybe I'll make folders to organize them, or move them. And then what? What happens when I install an app that calls those programs?
I have 644 items in
That's why there's a user level set of folders that aren't the standar UNIX convention.
T Money
World Domination with a plastic spoon since 1984
Here's a question. My SO has been using an original vintage iMac with OS9 for many years. She's totally non-technical. She's heard bad things from her old Mac friends about OSX (complexity, unfamiliarity, and so on) and so now when she's thinking of getting a new machine she's inclining towards XP.
My question is this, given that a non-technical person's experienced with both OS9 and XP, which is easier? To transition completely to XP, or to attempt to learn the new and different OSX? I don't think she's ever willingly opened a command prompt in her life.
Da Blog
the pico flamewar is not with vi -- it's with nano ;) (And luckily, it's not much of one.)
:) That is, pico / pine's license isn't to the satisfaction of the debian project, but nano's is. So when I wanted a light, friendly (and apt-getable) editor, nano it was :)
I still don't know how to do a lot of the things I got used to with pine, but I recently switched to mutt because it's faster.
However, previous to *that* switch is when I switched to nano from pico, for someone *else*'s ideological reasons
timothy
jrnl: http://tinyurl.com/c2l8yr / foes: http://tinyurl.com/ckjno5
If you have trouble configuring Apache, the Apache website doesn't help much because OS X has files in different locations.
/etc/httpd, log files are in /var/log/httpd, DocumentRoot is /Library/WebServer/Documents, and ScriptAlias /cgi-bin is /Library/WebServer/CGI-Executables.
/etc/apache, log files are in /var/log/apache, DocumentRoot is /var/www/htdocs, and ScriptAlias /cgi-bin is /var/www/cgi-bin.
/etc/httpd/conf, log files are in /var/log/httpd (symlinked at /etc/httpd/logs), DocumentRoot is /var/www/htdocs, and ScriptAlias /cgi-bin is /var/www/cgi-bin.
/usr/local/apache/conf, log files are in /usr/local/apache/logs, DocumentRoot is /usr/local/apache/htdocs, and ScriptAlias /cgi-bin is /usr/local/apache/cgi-bin.
Apache's files are in different places on different flavors of UNIX or Linux distributions - and they're different still if the administrator compiled from source.
On Mac OS X 10.3, configuration files are in
On Slackware 8.1, configuration files are in
On RedHat 9, configuration files are in
By default on most systems, if you've compiled from source and haven't changed any paths, configuration files are in
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
Try Running MacOSX, which is like a younger brother to the venerable Running Linux.
"First you gotta do the truffle shuffle."
A lot of times, the configuration file stuff is hidden in netinfo. I forgot the name of it, but the netinfo GUI utility is somewhere in /Applications/Utilities. A lot of this is text usually tucked away in files in /etc on most other Unix style systems. For information on the command line interface to netinfo, start with a ``man niutil'' and also check the ``See Also'' section at the end of this man page. I think the correlation to the standard Unix /etc files should probably be pretty obvious.
Although Mac OS X does come with probably all you need to make it a server for things, I think there's not much documentation available because Apple would like to sell Mac OS X Server and they do make some documentation available for that, some of which may apply to the regular OS (I don't know). Here's some documentation I found on their page that should be applicable to regular Mac OS X as well, but it's targeted at development. Maybe you can also try Mac OS X Hints. In theory, you should be able to use FreeBSD documentation together with documentation on netinfo to figure out some of what you need, but I'm not sure how realistic that is.
I'm not a unix expert. I don't pretend to be. But that is why I want a good book that goes deeper than how to use ls-l, and is current for this version of the OS. There are probably a lot of things I shouldn't be messing with, but that is why I set up a test server at home to play with and use to learn.
Isn't it kind of stupid how the distributions can't agree on a standard directory system?
The kernel is the hardest part of the OS to write, so the distributors have to pretend they are actually doing work, thus they waste their time "customizing" the directories.
What a waste of time.
You don't subscribe to the false logic that every individual within a sub-group thinks exactly alike, do you? 20 years ago there were people saying that you don't need a CLI, and there were people *using* a CLI on the Mac (MPW). Today there are still some that say you don't need a CLI, and still people using CLIs (Terminal). Over that time-period some people have left the Mac world and some new people have joined it. Everyone is entitled to his or her opinion, even if you disagree (and believe me, I often disagree with other Mac users)
Try to avoid prejudice.
I was a long time Mac user in the System 6-8 days, then switched away when cooperative multitasking etc. Just got old.
... so its a book for me.
I switched back specifically because of OSX - I had always wanted to learn about and tinker with Unix - run PostgreSQL, whatever - but I had never got around to it because I also needed to use Office etc, and didn't want to muck about with multiple machines, or dual-boot hilarity..
Open up a filemanager, Goto /usr/bin, and then proceed to eat your ignorant statement. 640 for panther, iirc that number was in the thousands with Redhat/Fedora. You CANT NAVIGATE THROUGH THAT.
Where does this perverse notion come from that GUI users are inhernetly incapable of using a command-line?
There's a deeper cultural thing going on here. On this site it's not uncommon to see programming-types bash (pardon the pun) users of more graphically-oriented tools (like Flash) with incredible zeal. It's as if there's some sort of Berlin Wall between creative and techinical people, and any attempt to bridge the two is doomed to failure or must be opposed.
This is nonsense.
This seperation of arts & humanities from the sciences is a relatively recent phenomonon. It's when people work with both sides of their brains that beautiful things really start to happen. Look at Leonardo Da Vinci if you want the best example. Look at the power of tools like Flash when you get people working on it to use its more powerful features like XML parsing with ActionScript, remoting, video etc. Look at musicians who can manipulate their creations electronically. Look at the animators who produce beautiful work on the big screen like Finding Nemo, Babylon 5 etc.
A lot of creative Mac people will benefit from having a deeper understanding of the way their command-line works, and if they're approaching it from a different angle than traditional Unix fans then so what? Isn't a fresh persective a good thing? Likewise I think that a lot of Unix fans could do well to visit more art galleries and explore their creative side a bit more. It may make better programmers out of them.
For the record, I work on both sides of the fence and do an equal amount of creative and technical work.
Drill baby drill - on Mars
Anyone worth their weight as an admin spends 90%
of their time in cli shell, regardless of the OS.
So It makes *cents* to become comfortable with
the power contained within.
plus i dig the sig.
Please give us an example of what the heck you're talking about. Because Apple also adds tools that nicely interface the command line with the GUI, I can honestly say my experience with the shell on Mac OS X has been far better than on Linux.
/Applications is the set of applications appropriate to the Mac and not appropriate to BSD/Unix/Linux, so you're full of beans there. Putting users home directories in /Users rather than whatever it is you think is the convention will not affect how other things in the system works---they're home directories, for cryin' out loud. It's certainly not going to change the fact that most people refer to home directories as ~user.
What's in
Are you trolling yourself or are you really that stupid?
Maybe the reason the book didn't cover package management is that the world of Mac OS X software installation is in flux and it would outdate the book before it hit shelves. Fink has its advantages, so does Darwinports. An explanation of both in sufficient detail is a topic that really deserves its own book.
http://tinyurl.com/4ny52
--Agreed. As in, "you cannot respect the power of your turbocharged V8 engine unless you can break it down and put it back together within an hour". What BS. Computers should be easy to use--and if you happen to be able to make them to do things above and beyond a standard user, fan-friggen-tastic. You're cool. And that probably applies to most people here who understand and "respect" the technology. But if that's not what you're trying to get out of it, it doesn't matter. For once I *disagree* with Professor Frink--Not everyone has to enjoy it on as many levels as him.
--Have a good night's sleep. Don't forget to brush your tooth.
You really ought to check out GNU Screen, which AFAIK comes with OS X by default. Screen allows you to run a number of shells or other interactive programs in a single terminal, sort of like having tabbed interface. However, Screen gives you all kinds of extra goodies with this--you can lock your session, detach it and reattach from anywhere, monitor "tabs" for silence or activity, split the terminal between one or more tabs, and so on. Better than "tabbed" terminals by far.
They're working on it - notice RedHat and Slackware use the same /var/www directory, and RedHat and Mac OS X use the same /var/log/httpd directory. Apple obviously chose their /Library/WebServer paths to be easier for GUI users (/var is hidden in the Finder). The problem is, if any distro changes their convention, they'll break compatibility with older versions of that distro.
$x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
$x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
there's joe, which I often find is installed on systems that don't have nano/pico.
/etc/apt/sources.list on a new Debian install ...
;))
It's not *quite* as friendly as nano/pico, but has enough similarities (and the built in status bar / help-reminder you crave) that I tend to use it when editing things like
(Of course, every UNIX system seems to have vi installed, so I wish I could remember its commands better
timothy
jrnl: http://tinyurl.com/c2l8yr / foes: http://tinyurl.com/ckjno5
Chapters 3 and 4 handle understanding of the UNIX filesystem
That's good, cos Macs run HFS+.
Schools?
As long as by "Windows and Macs" you mean "Windows." The only Macs left in schools are a few original iMacs left over from when school administrators actually bought Macs, back in 1998. Nobody's buying Macs in schools now.Schools?
As long as by "Windows and Macs" you mean "Windows." The only Macs left in schools are a few original iMacs left over from when school administrators actually bought Macs, back in 1998. Nobody's putting Macs in schools anymore.
Don't you know the "v" in "vi" stands for visual? What could be easier than [ESC]:wq?
You people are soft!
Theres other differences as well. I could not for the life of me get ls in color in tcsh, and i tried for hours. so frustrating.
A blog about stuff.
My reccomendation if you're going to run apache on your mac is to build from source. The preinstalled one is pretty stripped down and the config fairly nondefault, not to mention that it's a 1.3.x version.
Building from source is pretty painless (configure,make,make install), and you can put the files wherever you want (./configure --help).
At that point, the apache docs should suit you fine. I feel like the apache configuration as shipped should be for mac's concept of "personal web sharing" only.
Brian
why would I want to have 700 items in my folder where I put my programs when I don't use most of them?
/usr/bin, I don't have to. I install an App and it get's categorized in my menu.
That's why OSX's dock is flawed in my opinion. I've never browsed into
Why do you have to hunt down apps on your harddrive to run them? Because OSX's dock sucks at the one thing it is meant to do, organize your applications.
But contrary to popular belief, you can get all the normal right-click functions with a one-button apple mouse. You simply push Control as you click. Most slashdotters know this of course, but many windows users don't and have to be taught it when they sit in front of a mac and start complaining.
Of course I personally throw away my apple mice right away and buy the logitech mouse with scroll wheel and two buttons, but it isn't really necessary.
The dock isn't meant to organize your applications. It's meant to provide quick access to comonly used and open programs and minimized windows.
T Money
World Domination with a plastic spoon since 1984
/usr/libexec/telnetd
The editors I use, in order of increasing preference:
pico
BBEdit
nano (Yes, that's right; I prefer nano over BBEdit. I'm a free software zealot.)
gedit
Every time you run "emerge", a Microsoft drone dies.
Actually, the perceived slowness is just the result of the sloppy refresh rate of terminal.app, but a MUCH MUCH worse problem is the overall cpu usage for just printing some simple stuff. try the following: run mplayer to play back some divx movie, and use top -u -s5 to watch how terminal.app is eating up to 15% of cpu just to display the stupid progress/cpu-usage messages from mplayer!
now, does anyone have a more efficient terminal? maybe xterm is still the king...
still running a x86? dinosaurs do exist!
ZZ, half the keystrokes
These are all good responses, thanks very much.
For one person that said "max out the imac on RAM" - this thing is *old*. Original, no firewire, expansion slots, seriously slow. Viewing complex web pages often causes it to pause- even with lots of free RAM.
Then again, I cut my teeth on a Mac Plus so I have a whole different definition of slow-but-usable than the rest of the world.
Da Blog