Results 1 to 3 of 3

Thread: changing program paths

  1. #1
    Join Date
    Jan 2010
    Beans
    137
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question changing program paths

    I am writing shell scripts and want to be able to execute from the terminal by just entering the name. i.e.
    Code:
    smdawson@smdawson:~$ my_script
    I am changing the searched paths like this
    Code:
    smdawson@smdawson:~$ export PATH=$PATH: /script_folder
    This works for me and I can execute any shell script in the folder by typing the name in the terminal (i.e. my_script). However, if I close the terminal and come back, my changes are not saved. If I want to execute the shell script in the same way, I have to repeat the whole process of changing the searched paths, etc.

    Any info on making these changes stick?
    Let books be your dining table, and you shall be full of delights,
    Let them be your mattress, and you shall sleep restful nights.

  2. #2
    Join Date
    Feb 2007
    Beans
    4,045
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: changing program paths

    Add that line to ~/.profile . Then after you've logged out and back in, it should get sourced and $PATH will contain your script-folder.

    Code:
    echo "$PATH"

  3. #3
    Join Date
    Jan 2010
    Beans
    137
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: changing program paths

    I got it to save the changes. Thanks for the help.
    Let books be your dining table, and you shall be full of delights,
    Let them be your mattress, and you shall sleep restful nights.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •