Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

898
Views
WSL (windows subsystem linux) breaks $PATH when the windows PATH has folder names with spaces

When I start WSL I cant add folders to path. I found out that this is because folders that are included in the windows PATH that has white spaces in their name break the linux $PATH. : For instance, when putting $PATH in the command line I am getting ....Some other folders...:/mnt/c/Program: no such file or directory.

If this was a manual process, I would use either "Program Files" of Program\ files but this is imported before ~/.bashrc kicks in so I dont know how to fix this.

Thank you for helping

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Folders with spaces in their names should be enclosed with "", '', or escaped with backslash.

This is my path in .bashrc which I added in WSL to be able to use the code . to start up VSCode from WSL.

export PATH=$PATH:"/mnt/c/Users/Kamal/AppData/Local/Programs/Microsoft VS Code/bin"
over 4 years ago · Santiago Trujillo Report

0

After some more playing around "$PATH" did the trick.

over 4 years ago · Santiago Trujillo Report

0

I ran into the same problem when I created a second instance of Ubuntu 20.04 and set the default user through /etc/wsl.conf. Quoting $PATH in Line 6 ( export PATH=$PATH:${snap_bin_path} ) in /etc/profile.d/apps-bin-path.sh solved the problem for me.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!