After installing Dart commands like pub, dart2js are not found

I know nothing about Dart, yet I downloaded the deb and looked inside it. The files you're looking for are located at /usr/lib/dart/bin/. You're getting "command not found" because that directory is not in $PATH.

You should be able to run them by providing the full path:

/usr/lib/dart/bin/dart2js

Or you may want to add /usr/lib/dart/bin to $PATH.


Another way to fix it using symlinks

sudo ln -s /usr/lib/dart/bin/pub /usr/bin/pub
sudo ln -s /usr/lib/dart/bin/dart2js /usr/bin/dart2js