Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

when i try to run git-all-secrets i got Dockerfile: command not found and this is the command include correct information

here is an example of the issue

root@momo22:/home/momo/git-all-secrets# docker run -it abhartiya/tools_gitallsecrets -token=9a8b60a10cf683f238e05 -org=bugcrwod Command 'docker' is available in '/snap/bin/docker' The command could not be located because '/snap/bin' is not included in the PATH environment variable. docker: command not found root@momo22:/home/momo/git-all-secrets#  
like image 495
ELMO Avatar asked Jul 20 '19 04:07

ELMO


People also ask

What is ETC environment in Ubuntu?

The first file that the operating system uses at login time is the /etc/environment file. The /etc/environment file contains variables specifying the basic environment for all processes.


2 Answers

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

like image 73
Harry S Avatar answered Oct 05 '22 10:10

Harry S


you can add the path into .bashrc file

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

open new terminal or execute this command

$ source ~/.bashrc

like image 21
Jika Avatar answered Oct 05 '22 10:10

Jika