Why the Terminal

From Mac OS X Server FAQ

Jump to: navigation, search

In general, Apple strives to provide good parity between the GUI and CLI (command line interface). This includes providing CLI tools for functions performed with a GUI, and GUI tools for things commonly done in the CLI.

GUI tools are great because the interface complexity is often quite low. This allows the tool to be used by someone who may not know all the nitty gritty details of what is actually happening under the hood. GUIs also alleviate many communication problems between the user and the computer (typos anyone?). It is usually the case that the primary purpose of a GUI tool (at least, one used for administration tasks) is to make the task quicker and easier (and less prone to error) than would be achieved by using a CLI tool.

CLI tools, on the other hand, are traditinally designed for an audience that does not mind a fair degree of interface complexity. Because of this, CLI tools tend to be more capable, but also more complex.

If Apple wrote GUI tools to be as capable as CLI tools, the interface complexity would go (way) up. A happy medium seems to be: provide both GUI and CLI tools! This way, the GUI tool can be used for common tasks, and the CLI can be used whenever the needs are not addressed by the GUI tool. Defining what the 'common tasks' are is probably not that easy, and requires lots of customer feedback.

As Mac OS X Server has matured, the GUI and CLI tools have matured. A great example of this evolution is the Server Admin GUI tool and the serveradmin command line tool. Both of these tools have the same purpose: provide a consistant interface for administering key services. The feature parity of these tools between the GUI and CLI versions is remarkably good, to the point that they went to the trouble of implimenting features in the CLI that are much easier to do in the GUI, and vice versa.

Another interesting trend with Mac OS X has been the creation of GUI 'wrappers' for CLI tools. Programs such as these are released on a near daily basis at sites like http://macupdate.com or http://versiontracker.com.

It's possible to go very far with Mac OS X Server without touching the command line, but only if you use the product in ways that are anticipated by Apple. Deviating from this path generally means going beyond the (sometimes restrictive) boundries of the GUI tools. The drawback of course is the need to be proficient with a more complex interface.

Finally, it is worth mentioning that the CLI is a very very rich environment, with about a million opportunities to make things more efficient or automatic. The downside is the learning curve: nobody would want to learn about a CLI in order to accomplish a single task. However, once you DO begin to learn the CLI, you will be amazed at how much more control you have over things, and how much better you can observe the current state of the system.

External Resources

http://osxfaq.com/Tutorials/LearningCenter/ is a very compreshensive terminal guide / reference that covers the very basics all the way up through detailed file permissions info and fairly complex shell scripting. Highly recommended for the unix newcomer. Recommended Books

Personal tools
Toolbox