The command could not be located because '/snap/bin' is not included in the PATH environment variable The command could not be located because '/snap/bin' is not included in the PATH environment variable docker docker

The command could not be located because '/snap/bin' is not included in the PATH environment variable


Temporary solution:

Run the command export PATH=$PATH:/snap/bin

Permanent solution:

Edit /etc/environment and add /snap/bin in the list then restart your system.

Links

answer for similar error with same fix
More info on /etc/enviroment


you can add the path into .bashrc file

$ echo 'export PATH=$PATH:/snap/bin' >> ~/.bashrc

open new terminal or execute this command

$ source ~/.bashrc


To fix this issue do the following:

  1. Open the file /etc/environment.
  2. Add /snap/bin to the end of the PATH Variable and concatenate using the : character.

    Example lets assume we had the PATH variable in the file was: Path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"

    After your update this will look like: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin

  3. Finally to update your shell and have the PATH variable ready to use, run source /etc/environment
  4. Done