Skip to content

Instantly share code, notes, and snippets.

@K3ndev
Last active January 24, 2024 03:13
Show Gist options
  • Save K3ndev/e6b4adaaa8aa22f86c283f339bc584a9 to your computer and use it in GitHub Desktop.
Save K3ndev/e6b4adaaa8aa22f86c283f339bc584a9 to your computer and use it in GitHub Desktop.

to shutdown

  • wsl --shutdown

to install

  • wsl --install or search it inside of microsoft store

to remove an image

  • wsl --list
  • wsl --unregister <DistributionName>

docker support

gui support

  • link
  • then wsl --shutdown

react native setup with wsl

for java:

  • sudo apt install build-essential
  • sudo apt install default-jre
  • sudo apt install default-jdk

for emulator

  • sudo snap install android-studio --classic
  • run the android-studio in gui

for watchman:

  • sudo apt install automake libxdamage1 libpulse0
  • sudo apt-get install build-essential procps curl file git
  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • follow the post installation in your cli
  • brew update
  • brew install watchman

global variable

export ANDROID_HOME=$HOME/Android/Sdk 
export PATH=$PATH:$ANDROID_HOME/tools 
export PATH=$PATH:$ANDROID_HOME/platform-tools
  • source ~/.bashrc

use a tunnel (ngrok) with Expo

  • npm start -- --tunnel
  • npx expo start -- --tunnel
  • then use your expo go app in your phone
  • alternative is to use android studio inside of WSL

if the text of terminal become white

  • source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment