WSL and bash command

881

As I can understand from your question, you have installed flutter for windows and trying to access it from Ubuntu (WSL) which is wrong. They are different altogether.

You need to first install flutter in WSL, have a look at the official documentation here

Share:
881
user54517
Author by

user54517

Updated on December 11, 2022

Comments

  • user54517
    user54517 over 1 year

    I downloaded the flutter SDK, and have set the environment virable so that I can use the flutter command. On the Windows command prompt, it works well, but I work with the WSL. So when I launch the command prompt, I always launch bash command to switch to the linux environment. But there, the "flutter" command doesnt work and I understand that it's normal.

    It displays :

    /mnt/c/Users/Kamel/flutter/bin/flutter: line 5: $'\r': command not found
    /mnt/c/Users/Kamel/flutter/bin/flutter: line 6: $'\r': command not found
    /mnt/c/Users/Kamel/flutter/bin/flutter: line 14: $'\r': command not found
    : invalid optionel/flutter/bin/flutter: line 15: set: -
    set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
    /mnt/c/Users/Kamel/flutter/bin/flutter: line 16: $'\r': command not found
    ': not a valid identifierr/bin/flutter: line 17: unset: `CDPATH
    /mnt/c/Users/Kamel/flutter/bin/flutter: line 18: $'\r': command not found
    /mnt/c/Users/Kamel/flutter/bin/flutter: line 19: syntax error near unexpected token `$'{\r''
    'mnt/c/Users/Kamel/flutter/bin/flutter: line 19: `function follow_links() {
    

    So I wanted to know if a way to use the commands I have on Windows, on the WSL, existed or not ? Do I really have to install everything on WSL ? Isn't it possible to make a link between them ?

    Thanks !

  • user54517
    user54517 almost 5 years
    Ok, and it will be the case for any program that want to use with WSL, is it ?
  • Prateek
    Prateek almost 5 years
    Exactly, you got the concept.