techPowerUp! Forums

Go Back   techPowerUp! Forums > Software > Linux / BSD / Mac OS X

Reply
 
Thread Tools
Old Jul 5, 2009, 09:03 PM   #1
angelkiller
1000 Posts
 
angelkiller's Avatar
 
Join Date: May 2008
Location: North Carolina
Posts: 1,228 (0.67/day)
Thanks: 446
Thanked 225 Times in 201 Posts

Add a path to $PATH?

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.
angelkiller is offline  
Reply With Quote
Old Jul 6, 2009, 07:34 PM   #2
Easy Rhino
Linux Advocate
 
Easy Rhino's Avatar
 
Join Date: Nov 2006
Posts: 10,223 (4.29/day)
Thanks: 1,207
Thanked 2,775 Times in 1,793 Posts

System Specs

Quote:
Originally Posted by angelkiller View Post
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.
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.
Easy Rhino is offline  
Reply With Quote
Old Jul 6, 2009, 07:50 PM   #3
angelkiller
1000 Posts
 
angelkiller's Avatar
 
Join Date: May 2008
Location: North Carolina
Posts: 1,228 (0.67/day)
Thanks: 446
Thanked 225 Times in 201 Posts

Quote:
Originally Posted by Easy Rhino View Post
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.
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.
angelkiller is offline  
Reply With Quote
Old Jul 6, 2009, 08:01 PM   #4
Easy Rhino
Linux Advocate
 
Easy Rhino's Avatar
 
Join Date: Nov 2006
Posts: 10,223 (4.29/day)
Thanks: 1,207
Thanked 2,775 Times in 1,793 Posts

System Specs

Quote:
Originally Posted by angelkiller View Post
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.
what exactly do you need to decipher about that path line? also, what are you installing? perhaps i can help.
Easy Rhino is offline  
Reply With Quote
Old Jul 6, 2009, 08:23 PM   #5
angelkiller
1000 Posts
 
angelkiller's Avatar
 
Join Date: May 2008
Location: North Carolina
Posts: 1,228 (0.67/day)
Thanks: 446
Thanked 225 Times in 201 Posts

Quote:
Originally Posted by Easy Rhino View Post
what exactly do you need to decipher about that path line? also, what are you installing? perhaps i can help.
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...
angelkiller is offline  
Reply With Quote
Old Jul 6, 2009, 08:25 PM   #6
Easy Rhino
Linux Advocate
 
Easy Rhino's Avatar
 
Join Date: Nov 2006
Posts: 10,223 (4.29/day)
Thanks: 1,207
Thanked 2,775 Times in 1,793 Posts

System Specs

yea i wouldnt have a clue about how android works. do you install it over linux or entirely on its own?
Easy Rhino is offline  
Reply With Quote
Old Jul 6, 2009, 08:26 PM   #7
ZenZimZaliben
2000 Posts
 
ZenZimZaliben's Avatar
 
Join Date: Mar 2005
Location: USA
Posts: 2,103 (0.70/day)
Thanks: 131
Thanked 517 Times in 383 Posts
Send a message via MSN to ZenZimZaliben

System Specs

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 ":"
__________________
i7 930 @ 4.2Ghz
GIGABYTE x58 UD7
Kingston HyperX T1 Series 12GB
GIGABYTE 7970 (1280/1800)
OCZ Vertex 2 100GB SSD & VelociRaptor 300GB

HEATWARE
ZenZimZaliben is offline  
Reply With Quote
Old Jul 6, 2009, 08:47 PM   #8
angelkiller
1000 Posts
 
angelkiller's Avatar
 
Join Date: May 2008
Location: North Carolina
Posts: 1,228 (0.67/day)
Thanks: 446
Thanked 225 Times in 201 Posts

Quote:
Originally Posted by Easy Rhino View Post
yea i wouldnt have a clue about how android works. do you install it over linux or entirely on its own?
TBH, I have no idea. I'm just following the instructions. I have no clue what I'm going to get in the end.

Quote:
Originally Posted by ZenZimZaliben View Post
Are you looking for the pathing to be Pre or Past? Also you need to understand what the full path is.
I don't know what you're asking. Sorry.
Quote:
Originally Posted by ZenZimZaliben View Post
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 ":"
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.
angelkiller is offline  
Reply With Quote
Old Jul 6, 2009, 08:57 PM   #9
ZenZimZaliben
2000 Posts
 
ZenZimZaliben's Avatar
 
Join Date: Mar 2005
Location: USA
Posts: 2,103 (0.70/day)
Thanks: 131
Thanked 517 Times in 383 Posts
Send a message via MSN to ZenZimZaliben

System Specs

":/usr/local/bin" ":/usr/bin:"

It is already in the path. Assuming /usr is your home directory.
__________________
i7 930 @ 4.2Ghz
GIGABYTE x58 UD7
Kingston HyperX T1 Series 12GB
GIGABYTE 7970 (1280/1800)
OCZ Vertex 2 100GB SSD & VelociRaptor 300GB

HEATWARE
ZenZimZaliben is offline  
Reply With Quote
Old Jul 6, 2009, 09:00 PM   #10
oily_17
2000 Posts
 
oily_17's Avatar
 
Join Date: Sep 2006
Location: Norn Iron
Posts: 2,056 (0.85/day)
Thanks: 214
Thanked 679 Times in 516 Posts

System Specs

To add ~/bin to $PATH try this -

Quote:
You need then to edit the “.bashrc” file which is a hidden file in your home folder. You would therefore first need to make Ubuntu show your hidden files. In the menu bar on the top of the file browser window, select “View/Show Hidden Files” and check the mark .

Then find the file “.bashrc” file and open it with the text editor. You would then need to append a line or two to the file. For example, if you would like to add the path~/bin, you would need to add the following line to the file:

PATH=~/bin:”${PATH}”
EDIT: Source
__________________

oily_17 is offline  
Reply With Quote
Reply


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
which Drawing path? Morgoth General Hardware 4 Jun 16, 2009 04:24 PM
Upgrade path stagnated. Nick89 General Hardware 10 May 12, 2009 09:00 PM
Upgrade Path Kenshai System Builder's Advice 27 Apr 27, 2009 02:14 AM
Upgrade path dilemma Apocalypsee General Hardware 7 Dec 30, 2008 03:44 PM


All times are GMT. The time now is 04:07 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
no new posts