Results 1 to 2 of 2

Thread: make a command globally executable

  1. #1
    Join Date
    Mar 2008
    Location
    Nottingham
    Beans
    167
    Distro
    Ubuntu

    Question make a command globally executable

    I would like to know how to do the following:
    I have a directory with exactuable scripts:
    $path_to_dir/mm_script1
    $path_to_dir/mm_script1
    $path_to_dir/mm_script1

    at the moment I can execute them by either giving an absolute path or relative path.

    What variable do I need to set in order to be able to just type
    ./mm_scrip1 in any directory in the terminal?

    Thanks for the help!
    alea iacta est

  2. #2
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    ~/bin

    You need to set $PATH. That can be done in .profile, I think. But it might be better if you were to put them in ~/bin/ If that directory exists, it is automatically added to your path and you will be able to execute programs stored there from anywhere.

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
  •