473,396 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Trying to add locations to the PATH

jimpy
7
Greetings,

When I open a terminal and enter :"echo $PATH", I receive this printout:
james@james-desktop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
I successfully add :
PATH=$PATH:/home/james
james@james-desktop:~$ PATH=$PATH/home/james
james@james-desktop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games/home/james
But when I close the terminal, and later reopen and check the path, the addition has disappeared. The path is back to the original path, sans the "/home/james".

What way exists to save the change permanently?
Mar 19 '08 #1
5 1416
micmast
144 100+
open a terminal
$> cd ~
$> pico .profile
or use vi whatever you prefer

at the bottom it says someabout paths
just add the
PATH=/your/dir:$PATH

reboot, that should work
Mar 19 '08 #2
jimpy
7
Thank you for the reply, micmast.

I tried your suggestion but only got a "Command not found" message.

On a hunch, I tried just "pico" but that didn't prove fruitful either.

Oh well, it will come, I suppose, one of these days.

Again, thanks for answering.
Mar 19 '08 #3
jlm699
314 100+
I tried just "pico" but that didn't prove fruitful either.
pico is a text editor... so really you can use whatever your favorite one (if you have one already).

It's strange that you don't have pico, either that or pico's not installed in the default location and/or the PATH doesn't point to it.

My favorite editor is vim... so the command he suggested would be like:
Expand|Select|Wrap|Line Numbers
  1. cd ~
  2. vi .profile
  3.  
So the pico, vi, etc is simply the program opening the file .profile (the . means that it is a hidden file so it won't appear on an ls unless you add the -a option [ls -a], which is like saying "list all files" (try ls --help for more info or check your man pages) ).

Anyway, back on topic.... so if you have any text editor, be it emacs, vi, pico and the command "<favorite text editor here> ~/.profile" doesn't work, you could open the GUI version and use the File -> Open method to find/create your ~/.profile file

sorry if any of that went over your head; I know learning Linux can be a daunting task, but there's plenty of documentation out there and forums for guidance like this one (however I might suggest swapping to the System Administration -> Linux / Unix / BSD forum if you have more questions about Linux in general and not Python).
Mar 19 '08 #4
Laharl
849 Expert 512MB
Linux installs of, say, Ubuntu use GNU nano rather than UW pico. It's basically the same thing, but...so with nano, you'd use 'nano .profile' from your home folder to access this.
Mar 19 '08 #5
jimpy
7
jim699 ..

With your help I did finally got to and modified .profile.

Thanks a lot for your explanations.
Mar 19 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Scott | last post by:
I seem to remember reading somewhere that, if you do not include the .dll path name in the VBA 'Declare Function' statement, Windows looks in the following places for .dlls (in this particular...
2
by: Melissa | last post by:
A company wants to install a database on the network at 15 different locations. The networks are all separate, are mapped differently and the server name and share are named differently for each...
1
by: PeteZ | last post by:
If I write a C# routine and compile it as a DLL then place a reference to in in my Web App (called: myapplication) it gets deployed onto the location: \myapplication\bin\mydll.dll If this C#...
1
by: David | last post by:
Hi, I am attempting to write a C# photographic gallery. I wish to create a standard application that will cycle through all images placed inside a folder that is relative to the executable. ...
1
by: ian.johns | last post by:
I just need a simple code snippet to read from a config file the file locations needed for my Windows Service. Sort of like web.config but since this is a Windows Service, I won't be using that.
0
by: esha | last post by:
I'm learning WEB site stuff with C# and have a question. In order to produce precompiled application (dlls and required for a real hosting files) it's not enough to build the solution. It must be...
4
by: John Dann | last post by:
Can anyone point me to a summary of recommended folder locations for ..Net applications to use for eg config files. (Or if it's simple just spell them out please.) I'm currently saving my...
0
by: eholz1 | last post by:
Hello PHP group, I have a question about file locations, and whether on not (in my case, not) a page will execute depending on the location of the php file. I have a web devel server, with a...
0
by: anandvinod | last post by:
Hi, I have a .NET Assemble (DLL) which has dependencies on binaries that exist at 3 or 4 different folder locations. Is there any way in which I can set these paths for the assembly to probe for...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.