LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2009, 06:36 PM   #1
dhuck88
LQ Newbie
 
Registered: Mar 2009
Posts: 1

Rep: Reputation: 0
Using the addpath command


Hi,

I'm a very new Linux user, I'd like to develop my knowledge of it more in the future but at the moment Im using it to process GPS data.

I need to add a path in my home directory to a piece of matlab software elsewhere on the network.

Iknow the command I need is something like
addpath('path')
but when I use this it says the brackets are badly placed?

Can any body tell me what Im doing wrong?
Im using Fedora

If I havent given you enough information then no worrys,
I really am very new to this!! Just wondering if anybody could help!

Thanks


D
 
Old 03-16-2009, 07:16 PM   #2
JaksoDebr
Member
 
Registered: Mar 2009
Distribution: Fedora, Slackware
Posts: 104

Rep: Reputation: 21
The 'addpath' is not a common tool - at least I think so, because it's not part of any Linux system that I used so far (it's also not on my current Fedora). Generally
Quote:
PATH=$PATH:/my/new/path
is the method to add a new entry to your $PATH variable, where each path segment is separated by colons.

Your posting said that you want to "add a path in my home directory to a piece of matlab software" - adding a path to an application is different thing. For that you will need to use the application's preference interface or configuration file, I guess.

JD

Linux Archive

Last edited by JaksoDebr; 04-02-2009 at 05:16 AM.
 
Old 03-16-2009, 08:21 PM   #3
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos, Manjaro
Posts: 317

Rep: Reputation: 70
You would edit the .bash_profile file in your home directory and add extra paths inot the PATH= line
For example, as JacksoDebr said above you might do something like this:-

PATH=$PATH:/path/to/matlab-script

Don't forget to export PATH. In the bash shell all you really have to do is :-

export PATH=$PATH:/path/to/matlab-script

The first $PATH means expand any previous PATH value and then the ":" says append my extra PATH info.
 
Old 03-16-2009, 10:50 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
adding it to the .bash_profile is the best way
it will work just fine if all you need is the location to the executable file ( /home/YourUserName/mathLab/someFolder
and for most things that will work .But some programs will also need a "LD_LIBRARY_PATH" or LIBDIR or LD_RUN_PATH added to that file and to be exported

if just adding the path to the program dose not work please post the error .

PS. after you add it you MUST log out and log back in again for the change to work .
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
busybox command works, same command within script says permission denied jeroenv Linux - Newbie 2 01-17-2009 02:58 AM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 06:30 PM
My error in mkisofs command to make a command line iso mg92865 Linux - Newbie 1 06-20-2008 11:43 AM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration