"flutter: command not found" in ubuntu

6,660

I think your problem is in the pwd part of the export command.

Replace the single quotes in 'pwd' with Backtick/back quote (``) like this

export PATH="$PATH:`pwd`/flutter/bin"


EDITED

Above command will just work until you close the terminal. To make the change permanent you have to edit the .bashrc (or .zshrc, etc), using a text editor like vim, gedit or nano and place the same command at the end of the file.

vim ~/.bashrc or nano ~/.bashrc

Add the next line at the end of the file

# Add flutter to the path
export PATH="$PATH:`pwd`/flutter/bin"

Restart your terminal and verify that your PATH was set correctly with the echo $PATH command

Good luck!!

Share:
6,660
Admin
Author by

Admin

Updated on December 09, 2022

Comments