LinuxQuestions.org
Visit Jeremy's Blog.
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 04-27-2006, 08:45 AM   #1
merlingt1
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Rep: Reputation: 0
Setting your paths in .profile?


Hi guys,

I bet this has been asked before but I am having no luck finding it, probably because I am not even sure what to look for.

I have an executable that is let's say in folder /A but I am trying to run it from folder /B which is where I have my input files to the executable file. I believe I need to edit my .profile but what exactly should I search for so that I can do this? is it paths?

Many thanks!
~Irian
 
Old 04-27-2006, 09:00 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
yes,

you need to add folder "/A" to your path if you wish scripts/apps there to be executed from anywhere.

this is my path right now:

PATH=$PATH:/sbin:/usr/sbin:/ops:/opt/samba/bin

so if this was your path it would become:

PATH=$PATH:/sbin:/usr/sbin:/ops:/opt/samba/bin:/A

hope that helps....

if you don't have a .profile or no paths create one and put a line in like above.

e.g. PATH=$PATH:/A
 
Old 04-27-2006, 10:45 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
The file .profile goes into your home directory.
To find if it's there, use "ls -a" or "ls -la" on your home directory,
ie
Code:
ls -la /home/you
If you want the same setting for all users on the system (instead of just your user), you can "su" to root
and put the same PATH=$PATH:/A stuff in /etc/profile instead of your .profile.
 
Old 04-27-2006, 12:05 PM   #4
merlingt1
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Original Poster
Rep: Reputation: 0
satinet and timmeke -I appreciate the help. But I am still having trouble with it.

This is exactly what I have on my .profile

PATH=$PATH:/ssdldsk/tools/bin/IRIX/

the executable is located in: /ssdldsk/tools/bin/IRIX/
and the folder I am working from is: /ssdldsk/irian

After editing it I used "source .profile" to load it (correct me if wrong) and when I do this it gives me a "Variable syntax" message.
 
Old 04-27-2006, 12:07 PM   #5
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
source?


you just log out and back in again to load your profile........
 
Old 04-27-2006, 12:09 PM   #6
merlingt1
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Original Poster
Rep: Reputation: 0
I tried that too and still didnt work
 
Old 04-27-2006, 12:12 PM   #7
slackmagic
Member
 
Registered: Aug 2003
Distribution: Slackware
Posts: 253

Rep: Reputation: 32
actually merlingt1 is right :P

source is a nice tool that allows you to immediately make use of any changes made to your .bashrc without having to "logout"

I just recently discovered it myself and can't stop using it now - especially after tinkering with my .bashrc
 
Old 04-27-2006, 12:12 PM   #8
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
what's the output of "echo $PATH"??
 
Old 04-27-2006, 12:14 PM   #9
merlingt1
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Original Poster
Rep: Reputation: 0
the output is

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
 
Old 04-27-2006, 12:14 PM   #10
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
i did not know that! thanks.......
 
Old 04-27-2006, 12:16 PM   #11
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
so it's not working.

is your .profile in the right place and with the right permissions?

maybe show the output of "ls -l ~/.profile"

and your whole profile......

what distro or unix version are you using?
 
Old 04-27-2006, 12:20 PM   #12
merlingt1
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Original Poster
Rep: Reputation: 0
This is my .profile permissions: -rw-r--r--
should it be executable?

my .profile is in the home directory of my user account, which is the folder I am trying to run it from.... /ssdldsk/irian

Not sure what distro it is though.
 
Old 04-27-2006, 12:25 PM   #13
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
did you modify or create the file?

maybe your linux/unix isn't using this file......
 
Old 04-27-2006, 12:27 PM   #14
merlingt1
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Original Poster
Rep: Reputation: 0
it was already there, I only modified it.
 
Old 04-27-2006, 12:40 PM   #15
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.1
Posts: 1,469

Rep: Reputation: 46
sounds like your PATH is being set elsewhere.

what other "." files are in the home directory?
 
  


Reply

Tags
path, profile


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setting up paths Pyro-dragon Linux - Newbie 5 03-07-2005 07:04 PM
locating and edition .profile for java paths Madaize Linux - Newbie 1 11-07-2004 12:41 AM
Setting Paths? bluelaguna Linux - Software 2 08-07-2004 03:31 PM
setting paths bmagyar Linux - Software 10 11-01-2003 06:08 PM
question on paths and profile files bignester Linux - General 3 08-07-2003 03:54 PM


All times are GMT -5. The time now is 08:25 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration