Find the answer to your Linux question:
Results 1 to 6 of 6
Hi. Sorry if it's off topic. I was wondering... What do I have do to to not having to put ./ in front of a program i've made... To run ...
  1. #1
    j1s
    j1s is offline
    Just Joined! j1s's Avatar
    Join Date
    Nov 2006
    Location
    Norway
    Posts
    90

    ./ to run a program

    Hi.

    Sorry if it's off topic.

    I was wondering... What do I have do to to not having to put ./ in front of a program i've made... To run the program, that is.

    regards

  2. #2
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    665
    You could edit your environmental variable, $PATH, to include the current directory, .

    so, add something like this to your ~/.bash_profile
    PATH=$PATH:.

    but it is not really a good idea. If you want to have programs you've made be in your path, move them to their own directory (I suggest $HOME/bin ) and put THAT in your path,
    add this to your ~/.bash_profile
    PATH=$PATH:$HOME/bin

    You want your path to be static, not dependent on relative paths, as it could cause things to act up, especialy if you start naming applications in 2 different areas by the same name.
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

  3. #3
    j1s
    j1s is offline
    Just Joined! j1s's Avatar
    Join Date
    Nov 2006
    Location
    Norway
    Posts
    90
    Thank you very much.

    J1s

  4. #4
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    Another common thing is to place a symlink to a program in a directory in the path statement.

    For example, typically, firefox installs in /usr/share/firefox or some distros spread it around (/usr/lib/firefox/firefox.sh), neither in the path statement, so to be able to invoke it from the CLI, there's a symlink in /usr/bin.
    Code:
    dcat@Server:/mnt/hdb1/fdi> ls -l /usr/bin/firefox
    lrwxrwxrwx 1 root root 25 2009-04-18 08:46 /usr/bin/firefox -> ../lib/firefox/firefox.sh

  5. #5
    Just Joined!
    Join Date
    Aug 2009
    Posts
    2

    /configure file

    i write sh file to install the software. they give some steps that are follows
    1)tar xvfz myfile.tar.gz
    2)cd myfile
    3)./configure
    4)make
    5)make install
    please give the explanation of these lines and give some code to a package to install the linux

  6. #6
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    Location
    England
    Posts
    845
    Hello shunmugasundaram2007

    Your post is off topic to the current thread. Please create your own thread detailing your problem
    Linux User #453176

Posting Permissions

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