Mac system administration tutorials

OS X: Edit a file using TextEdit as root or superuser

Contributed by qmchenry on January 17, 2008 under Mac system administration

Editing some files on an OS X system requires superuser or root permissions. Typically, this is accomplished using sudo (which lets authorized users assume superuser powers, cape and tights optional) and vi. To the uninitiated, vi can cause intestinal distress and hair loss. An alternative is the use of TextEdit, the graphical text editor application, but under normal circumstances, you can open a system file like hosts but cannot save it. Following the steps in this recipe, you can edit a system file using TextEdit and put off learning vi for another day.

Comments
 

OS X Leopard: Flush or Clear the DNS Cache

Contributed by qmchenry on December 4, 2007 under Mac system administration

The command used to flush the DNS cache changed in the upgrade to OS X version 10.5, Leopard. The new command is just as easy to run, if not to remember.

Comments
 

OS X Leopard: Create new user account with parental controls

Contributed by qmchenry on October 19, 2007 under Mac system administration

Mac OS X Leopard includes new Parental Controls to help protect your children from computers (or help protect your computer from your children). In Apple’s way, this process is simple, but there are some options to consider. This recipe describes adding a new user account that will be under Parental Control and discusses some related concepts.

Comments
 

OS X: Change your PATH environment variable

Contributed by qmchenry on October 2, 2007 under Mac system administration

When you run a command from a UNIX or UNIX-like shell, the shell looks for the executable file using the directories listed in your PATH variable as a map. For convenience, adding directories to this environment variable means you don’t have to go hunting for a file each time you run it. Following these directions will allow you to add a directory to the search PATH.

Comments
 

OS X: Easily edit hidden configuration files with TextEdit

Contributed by qmchenry on October 1, 2007 under Mac system administration

In OS X, hidden files (those starting with a period like .profile or .bashrc) can be a challenge to edit because they are, well, hidden and don’t show up in Finder windows. While there are tricks to make hidden files visible in Finder windows, I prefer to keep my hidden files hidden. I also prefer to edit them using vi, but I know that many folks are likely to think ’six’ instead of ‘editor’ when presented with vi. What follows is a simple way to edit a hidden file using TextEdit without making any changes to the system.

Comments
 

Setup Mac OS X host to print to Windows shared printer

Contributed by qmchenry on August 28, 2006 under Mac system administration

Life is so much better when we all get along, especially when heterogeneous computer equipment can just work together. Integrating a Mac running OS X 10.4 to support printing to a shared printer on a Windows host is described in this Tech-Recipe.

Comments
 

Mac OSX: Delete a user account

Contributed by Rex on October 7, 2005 under Mac system administration

Deleting a user account is neat and clean with Mac OS X. This recipe describes the procedure and consequences of deleting a user.

Comments
 

Mac OS X install gcc compiler

Contributed by macster on October 3, 2004 under Mac system administration

Compiling open source projects typically requires a C compiler and gcc is typically the compiler of choice. Mac OS X doesn’t install the gcc compiler by default but it is freely available in the xcode suite of development tools.

Comments