bash: quarto: command not found

I am unable to execute quarto commands from the RStudio terminal. This discussion was previously opened here but not resolved.

I am on Windows 10, and I am using R 4.2.0, RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22), and Quarto 1.0.38. When I installed Quarto, I selected the option to install for all users as I have administrative privileges. My installation is location in program files, as seen in the image here.

In the terminal:

  • the result of quarto --version is bash: quarto: command not found
  • the result of echo $PATH is
/c/Users/pileggis/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/pileggis/bin:/c/rtools42/x86_64-w64-mingw32.static.posix/bin:/c/rtools42/usr/bin:/c/Program Files/R/R-4.2.0/bin/x64:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files (x86)/Sennheiser/SenncomSDK:/cmd:/c/Program Files/dotnet:/c/Program Files/SASHome/x86/SASFoundation/9.4/core/sasexe:/c/Program Files/SASHome/x86/SASFoundation/9.4/ets/sasexe:/c/Program Files/SASHome/x86/Secure/ccme4:/c/Program Files/Quarto/bin:/c/Users/pileggis/AppData/Local/Microsoft/WindowsApps:/c/Users/pileggis.old/AppData/Local/GitHubDesktop/bin:/c/Users/pileggis/AppData/Roaming/TinyTeX/bin/win32:/c/Program Files/Quarto/bin:/c/Program Files/RStudio/bin/postback:/bin:/c/Program Files/RStudio/bin/msys-ssh-1000-18:/usr/bin/vendor_perl:/usr/bin/core_perl

In the R console, the result of fs::path_real(Sys.which("quarto")) is C:/Program Files/Quarto/bin/quarto.cmd.

Any advice on how to get quarto commands to work would be much appreciated!

1 Like


Can you try:

quarto.exe --help
quarto.cmd --help

Windows shells (Powershell and git bash) can sometimes require naming the executable to pass commands.


quarto.exe --help yields bash: quarto.exe: command not found

and quarto.cmd --help yields


So because of the flavor of bash/terminal you are using on Windows, you'll need to use the full name of Quarto.

For example, where Quarto docs say:

quarto render file.qmd --to pdf

You would need to do:

quarto.cmd render file.qmd --to pdf

I confirm that from the screenshot you shared you are using got for windows terminal probably which is an emulation of bash. In this terminal, .cmd file is not recognized as a executable and so quarto is not found in PATH without the extension.

If you switch to powershell for example, this will work ok.

Thanks @TMock for being on deck with all these questions !


Thank you both very much, this is so helpful!

@cderv could this set up also impact my ability to use quarto extensions?

for example, i tried using the reveal-auto-agenda extension.

i was able to successfully install it using
quarto.cmd install extension andrie/reveal-auto-agenda

however, when i try to enable in my project with yaml

title: "Untitled"
format: revealjs
editor: visual
  - reveal-auto-agenda

i get
Could not find executable reveal-auto-agenda

Do you have any suggestions on how to resolve?

1 Like

We normally setup with rtools40 bash so that some specific package can be installed from source. So rtools40 bash is active to those RStudio users who requires package installation from source and it serves active in the terminal and it gives quarto command not found. It gives the same error even we use quarto.cmd or quarto.exe. But if we change our interpreter from rtool40 bash terminal to other such as Git Bash, or Command Prompt , or Power Shell, quarto command can be accessed as described in the documentation. I am discussing based on window 10 platform. So, please change your terminal resources (interpreter) to get quarto up and running at terminal.

Thank you for the suggestion, @kyawmoeaung! I did try changing the terminal resources via available options in Tools -> Global Options -> Terminal (Git bash, Command Prompt, Windows PowerShell). Then I closed all R projects and opened a new one. However, the issue still persisted for all three options.

Please make sure @shannon.pileggi that you have the extension installed in your .qmd folder (your current working directory, if the said _extensions folder is different from your qmd folder, it will turn out the error message as you have described previously). You should see _extensions folder in your working directory if you installed it correctly. Otherwise please use terminal to run quarto.cmd install extension andrie/reveal-auto-agenda and see if you find _extensions folder again. In case you can't find the folder, please try to run by changing the above suggested options again. Once you have it, you should be able to run render command at the top of your script in RStudio. Let see how it goes. For me it works with _extension folder in the working directory after running quarto install terminal.
Please download example.qmd from the author's github and try it to see if it runs as he has instructed. If it works, your script will definitely work as expected.


Thank you, @kyawmoeaung! I had missed that the installation was directory specific.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.