Atom is not getting opened in cmd


#1

When I try to open it from command line it shows “atom is not recognized as an internal or external command, …”. I use a 64 bit windows 10 system. Can anybody suggest a solution.


#2

How did you install Atom? Can you post your PATH environment variable?


#3

I installed atom via .exe file. as you asked here is my path

C:\Python34\;C:\Python34\Scripts;C:\Program Files (x86)\Python;C:\Program Files (x86)\Python\Scripts;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static

So what shall i do?


#4

You have to add Atom’s bin directory to your PATH. I’m sorry but I can’t remember the precise path…


#5

I Couldn’t find any bin directory called bin for atom. All I found out there were several atom bin folders in packages. Each had one. What shall I do ?


#6

There should be a directory containing only .cmd files, like APM.cmd atom.cmd and so on, if I recall correctly.


#7

It’ll be under your username’s (hidden) AppData directory:

Add that to your system’s PATH variable, as mentioned by @frabert and restart your cmd window to let the new variable take effect.


#8

I recommend you to insert in your path more paths:

C:\Users%USERPROFILE%\AppData\Local\atom\bin;
C:\Users%USERPROFILE%\AppData\Local\atom\app-1.0.5;
C:\Users%USERPROFILE%\AppData\Local\atom\app-1.0.5\resources\cli;
C:\Users%USERPROFILE%\AppData\Local\atom\app-1.0.5\resources\app\apm\bin;

May be this is a much more that you need. But with this path, some atom plugin will work such as script, linter, linter-flake8, and others.
Also I recommend you put the environment variables separately, to avoid the limit of character numbers in path variable.
Create a variable to python, atom etc, and add into path %python%;%atom%; %etc%
This will help you when Atom is updated. Because Atom creates another repository and your path will be out of date.


#9

I would strongly discourage adding version-specific paths, as it might lead to opening old versions when atom is updated.


#10

I agree with you. I need update the path every time that atom is updated.
I do this principally because of the node.exe.
I was having a lot of problems with atom plugins. They didn’t run because of they didn’t find node.exe.
Specifically with this line I solve this problem in Windows: C:\Users%USERPROFILE%\AppData\Local\atom\app-1.0.5\resources\app\apm\bin;
But as I said, this may be much more what is needed. I put this in my path and I work happily. :slight_smile:
I think that I said more than was asked.
I’m sorry. :expressionless:


#11

Thanks For the reply’s !

I got it working!


#12

Thanks @fthiagogv. i fixed it!


#13

I am having the same issue and not able to resolve it :frowning: Can someone please help. I have even added bin folder to the PATH!

Thanks in advance


#14

@frabert @fthiagogv please help!


#15

Go to C:\Users\Suhas Nayak\AppData\Local\atom\app-1.25.1\resources\app\apm\bin and look at what’s inside. There’s no atom in there. Additionally, since the path includes the current version of Atom, it’s going to be invalidated when Atom updates. You want to use C:\Users\Suhas Nayak\AppData\Local\atom\bin.


#16

Following your inscruction I set the path to C:\Users\Me\AppData\Local\atom\bin but it sents an error:

C:\WINDOWS\system32>where apm
INFO: Could not find files for the given pattern(s).

but this path work:

C:\Users\Me\AppData\Local\atom\app-1.25.1\resources\app\apm\bin

(windows 10)
image


#17

What files do you see inside C:\Users\Me\AppData\Local\atom\bin?


#18

The problem is that there is no bin folder (look at the printscreen above). The bin folder is within the app folder ex. C:\Users\Me\AppData\Local\atom\app-1.25.1\resources\app\apm\bin


#19

It sounds like you have run into this issue:

Can you try the workaround mentioned in https://github.com/atom/atom/issues/11450#issuecomment-233866304 to see if that creates the bin folder?


#20

Running atom --squirrel-updated solved it :heavy_check_mark:! Thanks a lot!