Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-14-2013, 05:48 AM   #1
LQ Newbie
Registered: Jun 2013
Posts: 2

Rep: Reputation: Disabled
Get .bashrc and .bash_profile work with new 64bit cygwin

Successfully installed the new 64bit cygwin and can start with cygwin.bat
@echo off
chdir \cygwin\bin
bash --login -i
I now want to be able to invoke .bashrc and .basc_profile using cygwin.bat
How do I go about this please.
Old 06-14-2013, 11:30 AM   #2
Registered: Sep 2011
Posts: 271

Rep: Reputation: Disabled
Hi Agnister!

To be specific, this is the version of Cygwin I'm running:

CYGWIN_NT-6.1-WOW64 w7_x64 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin
I normally just use Cygwin by starting a Cygwin Terminal, in which case both .bash_profile and .bashrc are executed. However, if, from a command prompt window, I run Cygwin.bat both files are also executed. My Cygwin.bat contains this:

@echo off

chdir C:\cygwin\bin

bash --login -i
AFAIK, with the version I'm using, I did not have to do the Bash related setup that's mentioned in the current Cygwin FAQ. But if the bash start-up files are not being executed in your situation, you might want to try what's mentioned in the FAQ:

Cygwin FAQ, Using .bashrc


Last edited by rigor; 06-14-2013 at 11:47 AM.
1 members found this post helpful.
Old 06-15-2013, 10:40 PM   #3
LQ Newbie
Registered: Jun 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for the info.I have added the following line to the bat file to make to work.
@echo off
chdir c:\cygwin\bin
bash --login -i

source .bash_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
.bashrc / .bash_profile /etc/profile /etc/bashrc deadeyes Red Hat 2 02-13-2010 12:22 PM
bashrc and .bash_profile happy78 Programming 5 10-19-2005 05:26 PM
bashrc or bash_profile ? ARCIS_house Linux - Newbie 6 07-21-2005 03:09 PM
.bashrc .bash_profile Soulful93 Slackware 4 05-03-2005 04:02 AM
.bashrc vs .bash_profile xor3 Linux - Newbie 1 08-16-2003 01:52 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:54 AM.

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