I am using WSL2 with ubuntu 20.04 with php 7.4.3 installed on it. Sometimes, php -S (for example php -S localhost:9000 -t public) doesnt work, nor does php artisan serve.
EDIT: When trying to access the address localhost:9000 from the browser, i get: "localhost refused to connect" terminating WSL distro has never solved the issue. From the terminal i get the normal: PHP 7.4.3 Development Server (http://127.0.0.1:9000) started