Score:0

The command could not be located because '/bin'

cn flag

Something is going really wrong with my cmd. I am trying to run a simple 'ls' command and it is impossible. The error says

Command 'ls' is available in '/bin/ls The command could not be located because '/bin' is not included in the PATH environment variable.'

I tried to find similar question but I didn't managed to fix the problem, and I am afraid that I will make it worse. When I run

echo $PATH

I am getting this

bash: SPATH:/home/george/snap/flutter/common/flutter/bin:/opt/netbeans/bin: No such file or directory

I think I messed it up with flutter and netbeans but I am not sure how to fix it. Thank you for your time.

Score:4
cn flag

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.

Score:2
cn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.