Administrative Tasks (OS X)

From The System Administrator Zone
Revision as of 16:29, 10 November 2008 by BobVanCleef (talk | contribs) (Restarting a System Daemon)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

My pet peeve with OS X is that simple little administrative tasks, that have been done in a standard way for decades, have become tricks for the cognizant. Only known to masters of OS X trivia. The reason it is my pet peeve is that they neglected to leave any clues to the new technique to be found by people using the old methodology.

Here are some examples.

Changing the System's Hostname -- Permanently

When you install a machine, it prompts you for the first user's name and names the machine after based on that information:


The Unix Way of Changing a Hostname

The standard method for changing a system's hostname on a *nix system is to use the hostname command. On OS X, if you use this command, it appears to work. Unfortunately, the first time you reboot your system the name will revert to first-last-names-computer.

The OS X Way of Changing a Hostname

The secret, as always, is to use the GUI.

System Preferences --> Sharing --> Computer Name

Restarting a System Daemon

The SystemStarter utility may be used to start, stop, and restart the system daemons.

  • The services may be found in /Library/StartupItems/ and /System/Library/StartupItems/

SystemStarter Options

  • restart: sudo SystemStarter restart Apache
  • start: sudo SystemStarter start Samba
  • stop: sudo SystemStarter stop MySQL