* How to make persistent changes to PATH in cygwin?
@ 2013-01-02 18:32 Aaron Schneider
2013-01-02 18:35 ` Eliot Moss
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Aaron Schneider @ 2013-01-02 18:32 UTC (permalink / raw)
To: cygwin
I've tried this:
export PATH=`echo $PATH`:/newdir/
And PATH contains the new dir, but after closing and reopening mintty
(with cygserver stopped) changes are lost.
How to solve that?
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to make persistent changes to PATH in cygwin?
2013-01-02 18:32 How to make persistent changes to PATH in cygwin? Aaron Schneider
@ 2013-01-02 18:35 ` Eliot Moss
2013-01-02 18:45 ` Aaron Schneider
2013-01-04 3:35 ` Andrey Repin
2013-01-04 5:20 ` Wynfield Henman
2 siblings, 1 reply; 8+ messages in thread
From: Eliot Moss @ 2013-01-02 18:35 UTC (permalink / raw)
To: cygwin
On 1/2/2013 1:32 PM, Aaron Schneider wrote:
> I've tried this:
>
> export PATH=`echo $PATH`:/newdir/
>
> And PATH contains the new dir, but after closing and reopening mintty (with cygserver stopped)
> changes are lost.
>
> How to solve that?
Every time you open up mintty you are starting a new login bash.
The way to set environment variables "persistently" (your term,
not mine) is to add the export command to your .bash_profile or
similar bash file read by bash when it starts up. This is not
specific to cygwin, but is normal Unix-like behavior.
Regards -- Eliot Moss
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to make persistent changes to PATH in cygwin?
2013-01-02 18:35 ` Eliot Moss
@ 2013-01-02 18:45 ` Aaron Schneider
2013-01-02 20:04 ` Andrew DeFaria
0 siblings, 1 reply; 8+ messages in thread
From: Aaron Schneider @ 2013-01-02 18:45 UTC (permalink / raw)
To: cygwin
On 02/01/2013 19:35, Eliot Moss wrote:
> Every time you open up mintty you are starting a new login bash.
> The way to set environment variables "persistently" (your term,
> not mine) is to add the export command to your .bash_profile or
> similar bash file read by bash when it starts up. This is not
> specific to cygwin, but is normal Unix-like behavior.
I've workarounded it adding the desired path to windows' path directly,
which is imported into cygwin each time mintty is started.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to make persistent changes to PATH in cygwin?
2013-01-02 18:45 ` Aaron Schneider
@ 2013-01-02 20:04 ` Andrew DeFaria
0 siblings, 0 replies; 8+ messages in thread
From: Andrew DeFaria @ 2013-01-02 20:04 UTC (permalink / raw)
To: cygwin
On 1/2/2013 10:45 AM, Aaron Schneider wrote:
> On 02/01/2013 19:35, Eliot Moss wrote:
>> Every time you open up mintty you are starting a new login bash.
>> The way to set environment variables "persistently" (your term,
>> not mine) is to add the export command to your .bash_profile or
>> similar bash file read by bash when it starts up. This is not
>> specific to cygwin, but is normal Unix-like behavior.
>
> I've workarounded it adding the desired path to windows' path
> directly, which is imported into cygwin each time mintty is started.
>
That's not really a good solution. Take a moment to read the bash(1) man
page and familiarize yourself with it's startup capabilities. Take
control of your own environment.
--
Andrew DeFaria <http://defaria.com>
This space for rent
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to make persistent changes to PATH in cygwin?
2013-01-02 18:32 How to make persistent changes to PATH in cygwin? Aaron Schneider
2013-01-02 18:35 ` Eliot Moss
@ 2013-01-04 3:35 ` Andrey Repin
2013-01-04 5:20 ` Wynfield Henman
2 siblings, 0 replies; 8+ messages in thread
From: Andrey Repin @ 2013-01-04 3:35 UTC (permalink / raw)
To: Aaron Schneider, cygwin
Greetings, Aaron Schneider!
> I've tried this:
> export PATH=`echo $PATH`:/newdir/
PATH=$PATH:/newdir
export PATH
> And PATH contains the new dir, but after closing and reopening mintty
> (with cygserver stopped) changes are lost.
> How to solve that?
Either, change windows environment, from which Cygwin $PATH inherited, or make
adjustments to Cygwin startup scripts.
--
WBR,
Andrey Repin (anrdaemon@freemail.ru) 04.01.2013, <07:18>
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to make persistent changes to PATH in cygwin?
2013-01-02 18:32 How to make persistent changes to PATH in cygwin? Aaron Schneider
2013-01-02 18:35 ` Eliot Moss
2013-01-04 3:35 ` Andrey Repin
@ 2013-01-04 5:20 ` Wynfield Henman
2 siblings, 0 replies; 8+ messages in thread
From: Wynfield Henman @ 2013-01-04 5:20 UTC (permalink / raw)
To: cygwin
Why are invoking 'echo' and not just simply
PATH=$PATH:/newdir ? Which is faster & take less resources.. I
On Wed, Jan 2, 2013 at 10:32 AM, Aaron Schneider
<notstop2@users.sourceforge.net> wrote:
> I've tried this:
>
> export PATH=`echo $PATH`:/newdir/
>
> And PATH contains the new dir, but after closing and reopening mintty (with
> cygserver stopped) changes are lost.
>
> How to solve that?
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to make persistent changes to PATH in cygwin?
2013-01-29 5:44 Chloe
@ 2013-01-29 14:45 ` Christopher Faylor
0 siblings, 0 replies; 8+ messages in thread
From: Christopher Faylor @ 2013-01-29 14:45 UTC (permalink / raw)
To: cygwin
On Tue, Jan 29, 2013 at 12:35:23AM -0500, Chloe wrote:
>Try this:
Please don't resurrect three-week old threads, especially when the question
was answered repeatedly.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to make persistent changes to PATH in cygwin?
@ 2013-01-29 5:44 Chloe
2013-01-29 14:45 ` Christopher Faylor
0 siblings, 1 reply; 8+ messages in thread
From: Chloe @ 2013-01-29 5:44 UTC (permalink / raw)
To: cygwin; +Cc: "Aaron Schneider"
Try this:
$ echo 'export PATH=$PATH:/newpath' >> ~/.bashrc
You can also edit your .bashrc file too. Here is an example line from the
.bashrc
export PATH=$PATH:"/cygdrive/c/Program Files/Notepad++"
Here is a bonus useful thing
alias splitpath="echo \$PATH | cut -d: -f1- --output-delimiter=$'\n'"
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-01-29 14:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-02 18:32 How to make persistent changes to PATH in cygwin? Aaron Schneider
2013-01-02 18:35 ` Eliot Moss
2013-01-02 18:45 ` Aaron Schneider
2013-01-02 20:04 ` Andrew DeFaria
2013-01-04 3:35 ` Andrey Repin
2013-01-04 5:20 ` Wynfield Henman
2013-01-29 5:44 Chloe
2013-01-29 14:45 ` Christopher Faylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).