# Startup file not run on Windows 10?

**URL:** <https://discourse.julialang.org/t/startup-file-not-run-on-windows-10/127788>\
**Category:** General Usage\
**Tags:** windows, startup\
**Created:** [April 7, 2025, 9:09am UTC](https://discourse.julialang.org/t/startup-file-not-run-on-windows-10/127788 "2025-04-07T09:09:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [April 7, 2025, 9:09am UTC](https://discourse.julialang.org/t/startup-file-not-run-on-windows-10/127788/1 "2025-04-07T09:09:23Z")

</div>

I usually work on Linux, and here I have a .julia/config/startup.jl file which is run when I start julia. I have copied the content of this int my windows computer:  
`C:\Users\Torkel\.julia\config\startup.jl`

However, it does not seem to work. I.e. it contain:

```julia
using Pkg

```

and

```julia
print_fields(x) = println(fieldnames(typeof(x)))

```

and both these fail on startup:

```julia
Pkg.status

```

```julia
print_fields

```

I have tried both in VSCode and using the terminal.

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [April 7, 2025, 10:09am UTC](https://discourse.julialang.org/t/startup-file-not-run-on-windows-10/127788/2 "2025-04-07T10:09:17Z")

</div>

`C:\Users\Torkel.julia\config\startup.jl`  
not  
`C:\Users\Torkel\.julia\config\startup.jl`?

---

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [April 7, 2025, 10:18am UTC](https://discourse.julialang.org/t/startup-file-not-run-on-windows-10/127788/3 "2025-04-07T10:18:18Z")

</div>

Sorry, markdown removed the \ in front of the . when I used normal text. Yes, the location is `C:\Users\Torkel\.julia\config\startup.jl`

---

<div class="post-metadata">

**Author:** ![digital\_carver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/digital_carver/32/33818_2.png) [@digital\_carver](https://discourse.julialang.org/u/digital_carver)\
**Post date:** [April 7, 2025, 8:10pm UTC](https://discourse.julialang.org/t/startup-file-not-run-on-windows-10/127788/4 "2025-04-07T20:10:41Z")

</div>

> [@Torkel](#):
>
> `C:\Users\Torkel\.julia\config\startup.jl`

1. Is `DEPOT_PATH` set correctly i.e. is  
`"C:\\Users\\Torkel\\.julia\\config\\startup.jl" in joinpath.(DEPOT_PATH, "config", "startup.jl")` `

2. Seems unlikely but: is there any alias/other mechanism by which `julia` is getting launched as `julia --startup-file=no`?

I was also thinking maybe there’s permission issues in reading the file, but denying read permission to my startup.jl and then trying to open Julia gives a clear error message that there’s a permission issue, so that’s probably not your issue. Note that I’m on Windows 11, and unless I mess with the permissions intentionally like just mentioned, Julia reads and uses the startup file without any issues.
