If you see this error when working on Windows 10 with composer or another .bat file of sorts setting up Laravel Homestead:
'rm' is not recognized as an internal or external command, operable program or batch file.”
this means it was run from a non Linux friendly location so from outside the Vagrant box. On you Windows box directly so to speak.
These Linux commands like
rm are available inside the Vagrant box the command or in a Linux kind of environment. So you could
- ssh into the box and run the bash file and or other commands requiring Linux commands https://laravel.com/docs/8.x/homestead#connecting-via-ssh
- install the Linux subsystem WSL if you want to run Linux commands from the Windows Power shell even when not inside the VM.
This command will then run without issues. I recommend adding WSL as it will allow you to move part of the Linux world and its handy commands into you Windows world and make your development life much easier.