Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ReBuild 19 - Comment être un linuxien heureux sous Windows

ReBuild 19 - Comment être un linuxien heureux sous Windows

Christopher MANEU

October 03, 2019
Tweet

More Decks by Christopher MANEU

Other Decks in Technology

Transcript

  1. Comment être un linuxien
    heureux sous Windows
    Christopher MANEU
    Azure Engineer & Advocate @ Microsoft R&D
    @cmaneu

    View Slide

  2. @cmaneu
    Venez comme vous êtes

    View Slide

  3. @cmaneu
    Ce dont a besoin un (développeur) linuxien
    ❑ Touch
    ❑ Grep
    ❑ Un système de fichiers
    ❑ VIM ou son éditeur préféré
    ❑ Exécuter des scripts bash/make
    ❑ Un shell custom
    ❑ Sa documentation
    ❑ Des trucs que tu peux faire que
    sous Linux
    ❑ SSH
    ❑ Des services (mysql, …)

    View Slide

  4. @cmaneu
    In short
    ❑ Install WSL 2
    https://aka.ms/rebuild19/install-wsl
    ❑ Install the new Windows Terminal
    https://aka.ms/rebuild19/terminal
    ❑ For the adventurous https://docs.docker.com/docker-for-
    windows/wsl-tech-preview/

    View Slide

  5. Thanks !
    Christopher MANEU
    Azure Engineer & Advocate @ Microsoft R&D
    @cmaneu

    View Slide

  6. View Slide

  7. wsl.exe
    Lxss manager
    service
    Host compute
    service
    init
    bash
    Ubuntu
    Virtual machine
    Linux Kernel
    1
    2
    3
    4
    WSL 2 architecture
    5

    View Slide

  8. wsl.exe
    Lxss manager
    service
    Host compute
    service
    init
    bash /mnt/c
    Ubuntu
    Virtual machine
    Linux Kernel
    VM worker
    9P protocol
    server for
    Windows files
    1
    2
    3
    4
    Windows files
    Accessing Windows files with WSL 2

    View Slide

  9. wsl.exe
    Lxss manager
    service
    Host compute
    service
    init
    bash cmd.exe
    Ubuntu
    Virtual machine
    Linux Kernel
    VM worker
    9P protocol
    server for
    Windows files
    1
    2
    3
    4
    Windows Files
    Launching Windows processes
    Interop command

    View Slide

  10. 9P Protocol Server
    wsl.exe
    Lxss manager
    service
    Host compute
    service
    init
    bash
    Ubuntu
    Virtual machine
    Linux Kernel explorer.exe
    1
    2
    3
    4
    Linux files
    Accessing Linux files with WSL 2
    ext4 VHD

    View Slide

  11. View Slide

  12. bash
    9P protocol server
    wsl.exe
    Lxss manager
    service
    Host compute
    service
    init
    bash cmd.exe
    Ubuntu
    Virtual machine
    Linux Kernel
    VM worker
    9P protocol
    server for
    Windows files
    explorer.exe
    9P protocol server
    init
    Debian
    1
    2
    3
    4
    Windows files
    Interop command
    Complete WSL 2 architecture diagram
    Linux files

    View Slide

  13. • Windows File Access
    • DrvFs mount options will continue to work in WSL 2
    • Interop
    • Launching Windows binaries
    • /etc/wsl.conf
    • Configuration options
    • wslpath
    • Translate paths from one environment to the other
    • $WSLENV
    • Share environment variables between Linux and Windows
    • Background task support

    View Slide

  14. • Build, run, and debug your Linux applications
    • Directly from VSCode
    • Using WSL as the backend

    View Slide