How to install shell commands in Atom to enable th

2020-03-12 07:54发布

问题:

Could someone please tell me how to install the shell commands for Atom to enable the atom command in the command line?

回答1:

According to the Atom Flight Manual, they should be installed when you run Atom for the first time.

When you first open Atom, it will try to install the atom and apm commands for use in the terminal. In some cases, Atom might not be able to install these commands because it needs an administrator password. To check if Atom was able to install the atom command, for example, open a terminal window and type which atom. If the atom command has been installed, you'll see something like this:

$ which atom
/usr/local/bin/atom
$

If the atom command wasn't installed, the which command won't return anything:

$ which atom
$

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

On my system (a Mac), they are installed in /usr/local/bin, but the location might vary depending on which platform you are using.

EDIT: I see your other question where you indicate you're using Windows. So this may not apply to you, as the quoted section deals with Mac computers. But I'll leave the answer here in case it helps someone else in the future.



回答2:

I realize this is an old thread, but I felt I could help on this one as I did not see a lot of answers.

I had the same problem of not being able to run atom from the CLI, on my Windows box.

My solution was to

  1. completely uninstall both GIT for windows and Atom,
  2. then reinstalling GIT bash first,
  3. then during the installation I used the third option under the "Adjusting your Path environment" which was "Use Git and optional Unix tools from the Windows Command Prompt".
  4. After that I installed Atom.

So GIT and ATOM in that order. This added both Git and optional Unix tools to the PATH.

The downside is having to reinstall all your packages which for me was not fun as I had way too many.



回答3:

Do you need this? https://atom.io/packages/atom-shell-commands

Im working with ubuntu and just went to the terminal and type:

$ sudo apm install atom-shell-commands

and then adding the commands to .config.cson file following the atom manual. Im newue with atom.