0

a little confusion as to why I cant use command line tools that are installed on my system from the XAMPP-VM terminal. For instance:

I start XAMPP-VM and click Open Terminal. I cd to htdocs and try to run something, like sass --watch style or npm init. It always says command not found, until I install the tool from inside the XAMPP terminal itself.

How to use the command line tools I have on my system, without having to re-install them from XAMPP-VM terminal.

nth-chile
  • 616
  • 1
  • 7
  • 20

1 Answers1

0

At home I have a MacBook and a Linux server. When I run commands on the Linux server, I get "command not found" even though the command works on the Mac. Why can't the Linux server access them?

This is because they're two separate computers running two separate OS. They can't easily share programs like that.

You're in the same situation, it's just that your XAMPP Linux server is a virtual machine. The same restrictions apply.

Instead, you can mount the directory you want to run commands in on your local system through the XAMPP volume menu, and then open a terminal on your local system and not in the VM., cd to it and run anything you want.

This will not run the command or process in the VM, but any files produced (such as by npm init) will be available to the VM.

that other guy
  • 116,971
  • 11
  • 170
  • 194