Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh: command not found: atom

This seems to be happening randomly, but every once in a while my "atom ." command in order to open a directory in atom won't work.

I run into the following terminal error - "zsh: command not found: atom".

Once I open up Atom manually, I can go ahead and install shell commands and the command works. However, the shell commands don't seem to be saving.

I've tried to edit my zshrc file and uncommented line two "export PATH=$HOME/bin:/usr/local/bin:$PATH". But this issue seems to still be happening.

Any help would be greatly appreciated!

Thanks!

like image 655
Marc Avatar asked May 06 '26 23:05

Marc


2 Answers

When Atom installs it automatically creates a symlink in your /usr/local/bin. However in case it hasn't, you can create it yourself on your Mac

ln -s /Applications/Atom.app/Contents/Resources/app/atom.sh /usr/local/bin/atom

Now you can use atom folder_name to open a folder and atom file_name to open a file. Hope this helps.

If you get "File exists" and the Atom command still dose not work just delete it and type the command over again.

To delete atom simply cmd+shift+G and paste

/usr/local/bin/atom
like image 142
metalheadcoder Avatar answered May 10 '26 13:05

metalheadcoder


I had this issue on my Mac, figured it out with the info below.

To install the atom and apm commands, run "Window: Install Shell Commands" from the Command Palette, which will prompt you for an administrator password.

Steps:

  1. Open Atom

  2. If you press Cmd+Shift+P while focused in an editor pane, the command palette will pop up.

  3. Type/run "Window: Install Shell Commands"

You can also simply open Atom, click "Atom" from the Menu bar, then select "Install Shell Commands"

like image 40
olmos_there Avatar answered May 10 '26 14:05

olmos_there



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!