-
Notifications
You must be signed in to change notification settings - Fork 0
Installation (WSL)
For clarity's sake, these instructions will be based on Ubuntu/Debian type distributions. Not every distribution is the same, and therefore not everything may apply to you if you choose to try a different distribution. If you prefer a different distribution, some steps may not be relevant to you.
- Install Ubuntu from the MS Store. Both base versions and specific LTS versions may be used. Follow the installer and create a user.
- Go to Docker Desktop > Settings > Resources > Check
Enable integration with my default WSL distro
and check Ubuntu. - Run
sudo apt update && sudo apt upgrade
to get your kernel and packages up to the latest version. - Run
sudo apt install nodejs npm 7zip php composer php-xml php-mbstring php-curl
; this installs all the dependencies that you need for the project.
Some distributions come with a preinstalled version of Node, and they are likely not the latest version even if you've installed the packages freshly. To fix this, we will use the NodeJS n
module:
- Run
sudo npm cache clean -f
. - Run
sudo npm install -g n
. - Run
sudo n stable
.
This will update your Node version to the most recent stable version. Alternatively, you can replace stable
with latest
if you like to live dangerously.
- Clone the project within the
/home/<user>/
directory. This is typically the default starting point for your terminal. -
cd
into the project. - Refer to the readme.
⚠️ The WSL filesystem and subfolders are inaccessible when WSL is not running.
In the Windows file explorer, in the address bar, you can type \\wsl$
to enter the filesystem. You will see docker-desktop
and docker-desktop-data
, along with your other WSL distributions. Ignoring the Docker folders, you can freely mess around with any files in here.
Open a Windows terminal and type wsl --unregister <distribution>
. These names are identical to the ones found in \\wsl$
.
In the home/user directory, there is a .bashrc
file. You can add an alias here to avoid having to retype ./vendor/bin/sail
each time, and shorten it to sail
instead.
⚠️ The nano text editor is difficult to use. If you get stuck, ask a teacher or a fellow teammate.
- Navigate to your
/home/user
directory. - Run
nano .bashrc
. - Copy
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
and paste it in the file. - Save the file.
- Restart all active shells.