Find the answer to your Linux question:
Results 1 to 4 of 4
Ok, I am having a huge brain fart... can anyone please remind me how to link a shell command again? I am setting up ant and I want to type: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! parabuzzle's Avatar
    Join Date
    Jun 2007
    Location
    Oakland, CA
    Posts
    11

    Link in Bash


    Ok, I am having a huge brain fart... can anyone please remind me how to link a shell command again?

    I am setting up ant and I want to type:

    #: ant

    and get ant to run... rather than:

    #: /usr/local/ant

    -Mike

  2. #2
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Code:
    ln -s /usr/local/ant /usr/local/bin/ant
    This will work if /usr/local/bin is in your PATH. Weird that /usr/local isn't.....
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  3. #3
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    /usr/local is a weird place to put a binary. (Normally they're found in /usr/local/bin or /usr/local/sbin, both of which should be in root's PATH.)

    Make sure you're using
    Code:
    su -
    and not just
    Code:
    su
    The former simulates a full login (including a complete PATH).

  4. #4
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Quote Originally Posted by anomie View Post
    /usr/local is a weird place to put a binary. (Normally they're found in /usr/local/bin or /usr/local/sbin, both of which should be in root's PATH.)
    True. When I said it was weird that /usr/local wasn't in your PATH, I was wrong. Apologies.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

Posting Permissions

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