-1

Whenever I type neofetch, i get this error:

Command 'neofetch' is available in the following places
 * /bin/neofetch
 * /usr/bin/neofetch
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
neofetch: command not found

This also happens to a lot of other commands that I run. Here is what happens when I run echo $PATH:

$HOME/.local/bin:$PATH
  • There is a problem with your PATH environment variable. Have you modified it manually, or maybe installed or run some program, that has modified it? Maybe anaconda? Please try to remember what you have installed or run recently. You can also run echo $PATH and edit your original question to show the resuilt, your current PATH. – sudodus Nov 04 '21 at 17:42
  • Somehow, the directories that are typically listed in your PATH variable aren't listed anymore. We recently had a similar case where a typo in a line to extend the PATH probably was the cause. Maybe it's a similar cause in your case. – Henning Kockerbeck Nov 04 '21 at 17:44
  • ok i edited my question. – ihbhuibhuibhuisonicy Nov 04 '21 at 17:44
  • Have you modified PATH manually, or maybe installed or run some program, that has modified it? Maybe anaconda? – sudodus Nov 04 '21 at 17:46
  • I think thats what happened. – ihbhuibhuibhuisonicy Nov 04 '21 at 17:47
  • I checked .bashrc and .profile and did not see any typos with path. Anything that said path in either of those files said $PATH – ihbhuibhuibhuisonicy Nov 04 '21 at 17:48
  • You must remember that upper case and lower case letters are different in Linux, so you should run echo $PATH. Maybe you set it literally (within single quotes), so that it is not expanded. In my computer it is /home/sudodus/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/games (one line) – sudodus Nov 04 '21 at 17:50
  • sorry that was a typo. I actually did type $PATH. – ihbhuibhuibhuisonicy Nov 04 '21 at 17:56
  • Is there anything i can do? – ihbhuibhuibhuisonicy Nov 04 '21 at 17:57
  • Did you maybe copy & paste some lines that change the PATH? I've seen cases where people copied some stuff in and wound up with curly quotes. Maybe the line that adds $HOME/.local/bin was printed with a similar glyph replacing $ where you copied it from. – Henning Kockerbeck Nov 04 '21 at 17:57
  • Also, Zorin maybe based on Ubuntu, but it isn't an official Ubuntu flavour. Therefore, I'm afraid this question is probably off-topic here and will probably be closed. If you can't solve the rest of your problem on your own, Unix & Linux SE or the Zorin forums maybe a good place. – Henning Kockerbeck Nov 04 '21 at 17:57
  • Thanks :-) Anyway, you are missing a lot of directories, where there are executable programs (you may not need those for games, but the others are pretty standard). – sudodus Nov 04 '21 at 17:58
  • I think i did run a command that did have something to do with my path. Is there anything i can do to fix this? – ihbhuibhuibhuisonicy Nov 04 '21 at 18:01
  • You should try to find out where and how the error was introduced and avoid it in the future. And of course reset PATH to a reasonable value in a persistent way. We don't know the details of Zorin, it may differ from Ubuntu, so you had better ask for details at a Zorin forum. – sudodus Nov 04 '21 at 18:01
  • 1
    I got the answer on the Zorin forum, thanks. – ihbhuibhuibhuisonicy Nov 04 '21 at 18:48

1 Answers1

1

To fix this issue use this command in terminal

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Greenonline
  • 2,081
Michel
  • 26