# Trouble Running Julia REPL in Git Bash on Windows

**URL:** <https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790>\
**Category:** General Usage\
**Created:** [December 18, 2023, 8:50pm UTC](https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790 "2023-12-18T20:50:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rud-lucien](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rud-lucien/32/38576_2.png) [@rud-lucien](https://discourse.julialang.org/u/rud-lucien)\
**Post date:** [December 18, 2023, 8:50pm UTC](https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790/1 "2023-12-18T20:50:39Z")

</div>

Hello Julia Community,

I’ve encountered an issue when trying to run the Julia REPL in Git Bash on my Windows machine and I’m hoping for some assistance in troubleshooting the problem.

**Issue Description:** When I attempt to start a Julia session by typing `julia` in Git Bash, the REPL starts but immediately freezes, and I am unable to type any commands. Interestingly, when I run Git Bash within Visual Studio Code or use Git CMD, the Julia REPL works as expected. This issue seems to be isolated to running Julia in an independent Git Bash window.

**Steps Taken So Far:**

1. Confirmed that Julia works fine in VSCode’s integrated terminal when Git Bash is selected from the dropdown menu.
2. Uninstalled and reinstalled Git Bash
3. Attempted to run Julia with `winpty julia`, but received an “Access is denied” error, likely due to the Julia installation being from the Windows Store (`WindowsApps` folder).
4. Uninstalled and reinstalled the Windows Store version of Julia.
5. Added the Julia `bin` directory to the PATH variable in Git Bash via the `.bashrc` file, with the correct path:
6. Verified that the PATH is correctly set in Git Bash, i.e. `julia --version` returns “julia version 1.9.4”

**System Information:**

- Windows Version: Microsoft Windows 10 Enterprise 10.0.19044 N/A Build 19044
- Git Bash Version: Git-2.43.0-64-bit
- Julia Version: 1.9.4

**Additional Context:** When closing Git Bash after I call julia and it hangs, I get a the following message.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/6/165120efa1124365b84d97f0696d42d8153f953d.png)

What’s really strange is that I can get this to work on my laptop, but not on a new desktop that I am trying to setup. I can’t seem to figure out what’s significantly different between my laptop and this desktop setup that is preventing this from working. I would greatly appreciate any insights or suggestions on how I could troubleshoot this further.

Thank you in advance for your help!

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 18, 2023, 9:00pm UTC](https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790/2 "2023-12-18T21:00:17Z")

</div>

It will not work. Use Windows Terminal instead, you can configure it such that it uses bash by default. The pure git bash does not work when you have juliaup installed, but with windows terminal it works.

> <https://github.com/JuliaLang/juliaup/issues/656>
>
> Steps to reproduce:
> 
> 1. Install git for windows https://gitforwindows.org/ I t…ested with 2.41.0, but same problem with older versions
> 2. Install juliaup
> 3. Install Julia 1.9.1 using juliaup
> 4. Launch git bash
> 5. type \`julia\`
> 
> Result:
> You cannot enter anything in the Julia REPL, it just hangs. You can terminate it with ctrl c
> 
> Expected result:
> Julia REPL works when julia is launched from the bash console.

---

<div class="post-metadata">

**Author:** ![rud-lucien](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rud-lucien/32/38576_2.png) [@rud-lucien](https://discourse.julialang.org/u/rud-lucien)\
**Post date:** [December 18, 2023, 9:33pm UTC](https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790/3 "2023-12-18T21:33:40Z")

</div>

Thanks for the heads up!

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [December 19, 2023, 5:30am UTC](https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790/4 "2023-12-19T05:30:13Z")

</div>

That is strange. Julia in the Git bash works fine for me.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/f/7f93f453cb2124d40d10af4f98d0ef5eea8ca39a.png)  
Perhaps something wrong with your mingw install?  
Try [GitHub - PetrKryslUCSD/VSCode\_Julia\_portable: Portable Julia running in VSCode](https://github.com/PetrKryslUCSD/VSCode_Julia_portable). Let me know  
how things go please. 🙂

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [December 19, 2023, 7:56am UTC](https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790/5 "2023-12-19T07:56:57Z")

</div>

Did you install it using `juliaup`? Only that causes the problem.

---

<div class="post-metadata">

**Author:** ![bjarthur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bjarthur/32/9638_2.png) [@bjarthur](https://discourse.julialang.org/u/bjarthur)\
**Post date:** [December 19, 2023, 2:48pm UTC](https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790/6 "2023-12-19T14:48:29Z")

</div>

have you considered using WSL2 instead of git-bash? julia works fine for me there.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [December 19, 2023, 2:55pm UTC](https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790/7 "2023-12-19T14:55:39Z")

</div>

Also have a look at Mobaxterm. I really rate this

[MobaXterm free Xserver and tabbed SSH client for Windows (mobatek.net)](https://mobaxterm.mobatek.net/)

---

<div class="post-metadata">

**Author:** ![rud-lucien](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rud-lucien/32/38576_2.png) [@rud-lucien](https://discourse.julialang.org/u/rud-lucien)\
**Post date:** [December 19, 2023, 6:31pm UTC](https://discourse.julialang.org/t/trouble-running-julia-repl-in-git-bash-on-windows/107790/8 "2023-12-19T18:31:34Z")

</div>

Was able to find a workable solution based on your post/suggestion. Thanks again!
