PDA

View Full Version : 10.7 Shell Commands?




Fritzables
May 13, 2011, 01:35 AM
Hi All,

I am lucky enough to buy one of the new series iMacs which I assume will have 107 Lion installed.

I don't have the unit yet as it's still in transit and this is my first Mac product.

I understand the OS is modeled over UNIX/Linux - if this is the case, when I open a Shell, would I also use the same commands that I used to use when I had Linux?

Pete



iVoid
May 13, 2011, 01:44 AM
Lion hasn't been released yet, so your new iMac won't have it.

Yes, you can use many unix and linux commands from the terminal.

Fritzables
May 13, 2011, 01:54 AM
Lion hasn't been released yet, so your new iMac won't have it.

Thanks iVoid, well... I didn't know that. So I'm guessing I will get Snow Leopard ?

Pete

tsmith
May 13, 2011, 02:57 AM
You will have snow leopard shipped with your new iMac

Mal
May 13, 2011, 11:31 AM
To answer the other part of the question, you'll have a standard bash shell available. You can install others, or X11 and use other windowing systems as well.

jW

larkost
May 13, 2011, 10:29 PM
I understand the OS is modeled over UNIX/Linux - if this is the case, when I open a Shell, would I also use the same commands that I used to use when I had Linux?

MacOS X (10.5 and 10.6) are certified UNIX's (linux is specifically not, and will forever be "unix-like").

As to "the same commands as Linux", then this is a definite maybe. Outside of the POSIX/UNIX mandated commands, MacOS X more often falls back on the BSD forms of doing things, rather than the GNU (linux) versions. While the broad strokes, and most of the commands are similar, the details can be annoyingly different if you switch back and forth all the time (different switches, different options, etc...).

Don't fall into the trap of thinking that one is better than the other. They are just different.

The other thought trap to avoid falling into is that MacOS X is not "built on top of" UNIX. Rather there is a BSD API layer in there. At the bottom of things the BSD layer is built on top of a (heavily modified) Mach kernel, and all of the very bottom layers (drivers, etc) are very different than the way linux puts them together (or traditional BSD for that matter). Additionally the top layers (the GUI) have only a few places where they really tie into the BSD layer (filesystem being the big one), mostly they are connected more directly with Mach.

And on the subject of shells, most of the usual ones are available: sh*, bash (default), tcsh, zsh, etc... More esoteric ones are available.


* as most *nix's today sh is just the bash binary running in a special mode

elithrar
May 14, 2011, 12:02 AM
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5)

I'd suggest Googling for "Homebrew" if you want an easy way to install specific GNU/CLI utils, too (i.e git, wget, etc)