Skip to content

Instantly share code, notes, and snippets.

View Codes-Lab's full-sized avatar
🎯
Focusing

AM Codes-Lab

🎯
Focusing
  • 01:49 (UTC +01:00)
View GitHub Profile
@Codes-Lab
Codes-Lab / expandDockerStorage.md
Last active May 16, 2023 12:38
Expand Docker Storage on WSL2

Identify the path to virtual disk of the docker

  • (default location: %LOCALAPPDATA%/Docker/wsl/data).

Start diskpart from the command line.

  • diskpart

Select disk by using the command

  • select vdisk file=

Grow the image by running expand command

  • expand vdisk maximum=

Shut down WSL2 by executing

  • wsl --shutdown
@Codes-Lab
Codes-Lab / .wslconfig
Created April 27, 2023 20:07
vmmem high RAM and CPU usage fix
#Using docker with WSL2 can slow your system due to a service vmmem
#vmmem is consuming most of the memory [in my case 12GB] and CPU
#To fix it :-
#Go to your user folder C:\Users\<Your_Username>
#create a file (.wslconfig) with following content
[wsl2]
memory=4GB
processors=4
@Codes-Lab
Codes-Lab / nginx-restart.ps1
Last active April 27, 2023 19:56
Stop and Start NGINX on Windows
taskkill /f /IM nginx.exe
start nginx