# How to pass command-line arguments to Jupyter Notebook?

**URL:** <https://discourse.julialang.org/t/how-to-pass-command-line-arguments-to-jupyter-notebook/100148>\
**Category:** General Usage\
**Tags:** jupyter, memory-allocation, notebooks, command-line-options\
**Created:** [June 10, 2023, 6:37pm UTC](https://discourse.julialang.org/t/how-to-pass-command-line-arguments-to-jupyter-notebook/100148 "2023-06-10T18:37:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yhchang96](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yhchang96/32/36499_2.png) [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Post date:** [June 10, 2023, 6:37pm UTC](https://discourse.julialang.org/t/how-to-pass-command-line-arguments-to-jupyter-notebook/100148/1 "2023-06-10T18:37:46Z")

</div>

How do I pass command line arguments when I run Julia using Jupyter notebook?

When I use VS Code to run Julia, I can go to settings and set `"julia.additionalArgs": ["--heap-size-hint=1G"]`, what about Jupyter notebook? I use Windows and normally I just go to Menu and click `Jupyter Notebook`, then it automatically opens in a web browser.

Alternatively, are there ways to set `--heap-size-hint=1G` in Jupyter notebook? I’m encountering memory issues when running Julia v1.9.1 and based on what I have found in recent posts setting `--heap-size-hint` is a quick fix (at least for the codes I’m running).

---

<div class="post-metadata">

**Author:** ![SteffenPL](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/steffenpl/32/206270_2.png) [@SteffenPL](https://discourse.julialang.org/u/SteffenPL)\
**Post date:** [June 11, 2023, 2:11pm UTC](https://discourse.julialang.org/t/how-to-pass-command-line-arguments-to-jupyter-notebook/100148/2 "2023-06-11T14:11:30Z")

</div>

You could run Jupyter notebooks directly in VS Code, using [Jupyter - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter). That way it uses the VS Code configuration for Julia.

Otherwise, if you use `IJulia`, then you create a new kernel with your preferred options, see [Installation · IJulia (julialang.github.io)](https://julialang.github.io/IJulia.jl/stable/manual/installation/#Installing-additional-Julia-kernels) and [Making kernels for Jupyter — jupyter\_client 8.2.0 documentation (jupyter-client.readthedocs.io)](https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs).

* * *

(Independent, it sounds a bit strange that the option is needed.)
