Problem When testing snap on terminal

Hello, I’m a newbie to GNU and Linux and stuff and I’m using elementary os atm. I so I installed snap and hello world snap using the commands but when I’m about to use hello-world command for testing if I did right or not the terminal doesn’t recognize the command: zsh: command not found: hello-world
please help!

and i need to add that i have an error before: make snap core available to the system

I suspect you don’t have /snap/bin in your terminal’s PATH environment variable. Instead of calling hello-world you should be able to use snap run hello-world even without adding /snap/bin to the PATH.

I’m not sure about on Elementary, but Ubuntu will automatically add the /snap/bin to your PATH once you’ve installed snapd after you restart your session and forever thereafter.

IIRC Elementary is based on Ubuntu, so with zsh you will hit: https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1640514 Unless it’s fixed in Elementary’s repsitories.

Snapd also uses systemd-environment-d-generator which should load the relevant paths from /usr/lib/environment.d/990-snapd.conf and make them part of your user session environment, which your desktop environment is expected to use. I don’t know why this is not applied on Elementary, as it seems to be working elsewhere. Perhaps try reaching out in their bug tracker/forums/IRC?