1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Add a path to $PATH?

Discussion in 'Linux / BSD / Mac OS X' started by angelkiller, Jul 5, 2009.

  1. angelkiller

    angelkiller

    Joined:
    May 16, 2008
    Messages:
    1,258 (0.58/day)
    Thanks Received:
    225
    Location:
    North Carolina
    This is probably a simple question. I'm trying to install something. Here are the instructions that I'm having trouble with.
    Code:
       1. Make sure you have a ~/bin directory in your home directory, and check to be sure that this bin directory is in your path:
            $ cd ~
            $ mkdir bin
            $ echo $PATH
    Well, when I run the last command, I get:
    Code:
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    But I don't understand what that means.

    I just need for ~/bin to be in the $PATH file. This is all on Ubuntu 9.04. Any help would be awesome. Thanks. :)
  2. Easy Rhino

    Easy Rhino Linux Advocate

    Joined:
    Nov 13, 2006
    Messages:
    13,194 (4.87/day)
    Thanks Received:
    3,121
    hrm...well the echo command just echoes the dir path you are in. i dont know if it actually does anything as far installing software. i may be wrong tho.
  3. angelkiller

    angelkiller

    Joined:
    May 16, 2008
    Messages:
    1,258 (0.58/day)
    Thanks Received:
    225
    Location:
    North Carolina
    Yeah, I think you're right. I think the purpose of the echo command was to check if ~/bin was in the $PATH file. My problem is that I can't decipher the output and I don't know how to add ~/bin to the $PATH file.

    Just for clarification, the snippet of instructions I gave is just a few steps in the installation process. Nothing is actually supposed to be installed with those steps.

    Thanks for the reply.
  4. Easy Rhino

    Easy Rhino Linux Advocate

    Joined:
    Nov 13, 2006
    Messages:
    13,194 (4.87/day)
    Thanks Received:
    3,121
    what exactly do you need to decipher about that path line? also, what are you installing? perhaps i can help.
  5. angelkiller

    angelkiller

    Joined:
    May 16, 2008
    Messages:
    1,258 (0.58/day)
    Thanks Received:
    225
    Location:
    North Carolina
    Ok, after seeing this thread about Android on a PC, I thought I'd give it a try. After following a string of links, I ended up at this page. I got stuck in the 'Installing Repo' section.

    I don't understand what the echo $PATH command is saying. Is it giving me a list of directories seperated by colans? Or is it saying something else. The format of the output confuses me.

    And I've found a workaround. Adding a directory to the $PATH file lets you call files in that directory without typing the whole location. For example, I'd be able to type 'repo' to use Repo instead of '~/bin/repo'. And actually, that's the workaround. Because ~/bin is not in my $PATH file, I have to call repo manually. Minor inconvenience, but at least it works.

    For anyone who cares about the results of me trying Android, I got stuck again. They say you need 1.5GB of RAM in order to compile it. Well, the machine I was using only had 512MB. My main Linux machine (my laptop) only has 1GB and I haven't gotten around to installing Linux on my powerful desktop with 4GB of RAM. So later today I'm gonna boot a live CD and try it again on my desktop. I'll make a thread about it if I get it to work...
  6. Easy Rhino

    Easy Rhino Linux Advocate

    Joined:
    Nov 13, 2006
    Messages:
    13,194 (4.87/day)
    Thanks Received:
    3,121
    yea i wouldnt have a clue about how android works. do you install it over linux or entirely on its own?
  7. ZenZimZaliben

    ZenZimZaliben

    Joined:
    Mar 4, 2005
    Messages:
    2,549 (0.77/day)
    Thanks Received:
    526
    Are you looking for the pathing to be Pre or Past? Also you need to understand what the full path is.

    What that output is stating is that those values (directory paths) are included in your PATH statement. Meaning it can pull library files and other files from those directories without you having to write the full path everytime. Each path is seperated by ":"
  8. angelkiller

    angelkiller

    Joined:
    May 16, 2008
    Messages:
    1,258 (0.58/day)
    Thanks Received:
    225
    Location:
    North Carolina
    TBH, I have no idea. I'm just following the instructions. I have no clue what I'm going to get in the end. :cool:

    I don't know what you're asking. Sorry.
    Ok, that makes sense now. By chance do you know how to add ~/bin to that list? Or do I have to first answer your fist question?

    Thanks.
  9. ZenZimZaliben

    ZenZimZaliben

    Joined:
    Mar 4, 2005
    Messages:
    2,549 (0.77/day)
    Thanks Received:
    526
    ":/usr/local/bin" ":/usr/bin:"

    It is already in the path. Assuming /usr is your home directory.
  10. oily_17

    oily_17

    Joined:
    Sep 25, 2006
    Messages:
    2,313 (0.84/day)
    Thanks Received:
    670
    Location:
    Norn Iron
    To add ~/bin to $PATH try this -

    EDIT: Source

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page