Kyng Chaos
“The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects.”
- the wisdom of Tarzan

Shell Setup

The default startup files for the Terminal don't allow you to easily run applications from /usr/local/bin. On Panther and Tiger, /usr/local/bin is not in the PATH. On Leopard it's after /usr/bin, so you can't override system programs with updated versions.

To change this, and set up some other basic shell stuff, you need to change your user startup scripts. If any of these files already exist in your home folder (use ls -a in a new Terminal), use BBEdit to add the quoted lines to the appropriate files. You only need to do this once.

(If there is no .bash_profile) open a Terminal and type the following (in a new terminal window you should be in your Home folder, stay there):

$ echo "export PATH=/usr/local/bin:/usr/local/sbin:$PATH" > .bash_profile
$ chmod 644 .bash_profile

In the future, if other custom paths are needed, edit .bash_profile and add them to the front of the PATH, separated by colons.


Another nice customization - LESS. By default, when paging screens in man pages and other paged text, your Terminal buffer is ignored, and everything disappears when the command is finished – makes it harder to scroll back and forth looking for the info you want.

To make LESS not do this, add this to your .bash_profile:

LESS=-X

Speaking of the buffer, the default for a Terminal window is 10000 lines. While this is fine for most users, compilation often exceeds that. An unlimited buffer doesn't hurt on modern fast Macs – plenty of memory and speed. But you may notice a slowdown on slower Macs. To set an unlimited Terminal buffer:

For Panther and Tiger

In a new window, get info (cmd-I). Select Buffer from the popup menu. Click the Unlimited scrollback radio button. Click Use Settings as Defaults to make this default for all Terminal windows.

For Leopard

(This may be default already) From the Terminal main menu, select Preferences. Click the Settings button. Select the saved setting of your choice. Select the Window tab. Click the Scrollback Unlimited radio button. Click the Default button below the settings list to make this the default for all windows.

macosx/notes/shell.txt · Last modified: 2007/11/24 11:21 by kyngchaos
[unknown link type]Back to top
Copyright © 2004-2011 William Kyngesburye Driven by DokuWiki Recent changes RSS feed