# Set Up Laravel & Node.js Development Environment on Windows with WSL 2 (Ubuntu 24)

In this guide, we'll walk through setting up a robust Laravel and Node.js development environment similar to Laravel Valet on Windows with WSL 2 Linux distro Ubuntu 24.

### Prerequisites

Before starting the setup, ensure you have admin access and that Ubuntu 24 is installed on your machine, either natively or on [Windows with WSL 2](https://sohaibilyas.com/how-to-install-ubuntu-linux-on-windows-11-with-wsl-2).

This is how you can check which Ubuntu release version you are running:

```bash
lsb_release -a
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1732984203564/5ce43aef-e882-4c64-8b56-b87aecb6e30a.png align="center")

### Install Dependencies

```bash
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install curl libnss3-tools jq xsel openssl ca-certificates
```

### Install PHP and Composer

```bash
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php-cli php-curl php-mbstring php-xml php-zip php-common composer
```

### Install Valet Linux Plus

[Valet Linux Plus](https://valetlinux.plus/installation) is Laravel Valet like development environment for Linux, run the following command to install it:

```bash
composer global require genesisweb/valet-linux-plus
```

### Add Composer Path

```bash
export PATH="$PATH:$HOME/.config/composer/vendor/bin" >> ~/.bashrc
source ~/.bashrc
```

### Install Laravel Development Environment

Now just one command will install all the tools for Laravel dev environment e.g. Nginx, PHP, MySQL, Redis, Dnsmasq, Mailpit using Valet Linux Plus.

```bash
valet install
```

### How to Use Valet Linux Plus

Now you have successfully installed Laravel Valet like dev environment on Linux Ubuntu 24. Valet Linux Plus has many features e.g. [serving websites, SSL, proxy](https://valetlinux.plus/serving-sites), [handling database](https://valetlinux.plus/database), [PHP versions](https://valetlinux.plus/php-version), [isolated PHP versions](https://valetlinux.plus/isolate-version).

### Install nvm (Node.js Version Manager)

Run the follow command to install nvm on your machine running Ubuntu 24.

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
```

### How to Use nvm

```bash
nvm -h # how to use nvm
nvm install --lts # install latest lts version
nvm install 20.1.0 # install specific version
```
