การติดตั้ง wsl บน Windows 10, 11

Program / Tools ที่ต้องมีก่อน

  • Windows 10 (latest update)

ขั้นตอนการติดตั้ง wsl บน Windows 10, 11

  • เปิด Windows feature โดยการกดปุ่ม Windows บน keyboard (ปกติบนปุ่มจะเป็น logo Microsoft) แล้วพิมพ์คำว่า features จะมี program ที่ชื่อ Turn Windows features on or off ให้เลือก program นี้ ให้เลื่อนลงไปด้านล่างแล้วติ๊กเลือกหัวข้อ Windows Subsystem for Linux เสร็จแล้วรอสักครู่ เมื่อ install feature เสร็จก็ให้ Restart เครื่อง
  • เมื่อ Restart กลับมาแล้ว ให้กดปุ่ม Windows เหมือนเดิม แล้วพิมพ์ cmd จะขึ้น program Command Prompt ให้เลือก Run as Administrator ตามภาพ
  • เมื่อเปิด Command Prompt มาแล้ว พิมพ์ wsl –update แล้วรอ wsl update ซักครู่
  • wsl –update
  • เมื่อ wsl update เรียบร้อย ให้พิมพ์คำสั่ง wsl –install Ubuntu-22.04 เพื่อ install Ubuntu ลง wsl รอให้ install Ubuntu เสร็จ ขั้นตอนนี้จะมีให้สร้าง user ก็สร้าง user/password ตามต้องการ และจำให้ได้
    เช่น user: docker, password: password, confirm password: password
  • wsl –install Ubuntu-22.04

Leave a Reply

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading