The command could not be located because '/bin'

Solution 1:

Your PATH environmental variable does not anymore include standard system locations for binaries. ls, which is an executable in /usr/bin/, is not found. echo is a shell build-in and thus can be executed.

Your error is caused by a typo. You indicated SPATH rather than $PATH in your new PATH statement. The first is just that, the second will be substituted automatically by the current setting of the PATH.

So wherever you changed your PATH, correct this typo. Chances are you have done the changes in ~/.profile or eventually ~/.bashrc, unless you have modified system files. See here for places where a PATH is set or changed in a Linux system.

Solution 2:

There's probably a typo in your integration of Flutter and NetBeans. If you reference a environment variable, you prefix it with a dollar sign, for example $PATH.

To add something to your existing path, you set the variable to the old value, plus your additions:

PATH="$PATH:/some/other/directory"

Going by your question, your integration of Flutter and NetBeans doesn't refer to $PATH, but to SPATH. So, you're setting the path to the newly added directories, but without keeping the previous path.