Skip to content. | Skip to navigation

FreeSMUG

Sections
Personal tools
You are here: Home Tutorial Fink tutorial 04-How to set PATH environment variable
Document Actions

04-How to set PATH environment variable

by Gand last modified 2004-06-01 11:44 PM

Create and edit .profile and .bashrc files using Terminal

video Watch video

As Panther default shell is bash or if you are using sh or zsh:

Launch Terminal. terminal.app You'll find it in /Applications/Utilities

.profile

  • At the terminal prompt, to open the text editor pico and create a file named .profile,
    execute the following command typing (or copy/paste):

    pico .profile

terminal.app

  • Press Return, when the text editor open, type (or copy/paste):

    source /sw/bin/init.sh

at the end of the line press Return once.

terminal.app

  • Then press Control-O, Return, and Control-X
    to save the file and return to the prompt.

.bashrc

  • Create a file named .bashrc typing (or copy/paste):

    pico .bashrc

terminal.app

  • Press Return, when the text editor open, type (or copy/paste):

    [[ -z $DISPLAY ]] && export DISPLAY=":0.0"

    . /sw/bin/init.sh

at the end of the line press Return once.

terminal.app

  • Then press Control-O, Return, and Control-X
    to save the file and return to the prompt.

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: