1755352 Members
4789 Online
108831 Solutions
New Discussion юеВ

Path question

 
John Ramsay_2
Regular Advisor

Path question

I assume the /etc/path file is my path...
When and what should I add to this?
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: Path question

The file is /etc/PATH. Typically, your path is set in /etc/profile with something like this:
export PATH=`cat /etc/PATH`

You would add things to /etc/PATH when you install new software or have some other need to access applications which are not already in your path.


Pete

Pete
John Carr_2
Honored Contributor

Re: Path question

Hi

you can add what you like to the path providing you have access, then you can execute from anywhere.

John.
Sunil Sharma_1
Honored Contributor

Re: Path question

Hi,

Yes /etc/PATH is for PATH environment and /etc/MANPATH for manual page's path


Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
T G Manikandan
Honored Contributor

Re: Path question

you need to add the path of the commands which are not already there in /etc/PATH or $PATH variable


Thanks
John Strang
Regular Advisor

Re: Path question

Hi,

To check the current path you can do
echo $PATH

Also check the .profile or .cshrc in your home directory (depending on the shell you are using).

John
If you never make a mistake you'll never make anything.
Fabio Ettore
Honored Contributor

Re: Path question

Hi,

if you want to add some commands in order to launch them from everywhere just insert its absolute path into PATH variable:

# export PATH=$PATH:/

and for a static change (that is a valid after a reboot too) just insert into /etc/PATH file.

Anyway you should verify user's .profile too (as John said).

I hope this helps you.

Best regards,
Ettore
WISH? IMPROVEMENT!