Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install shell commands in Atom to enable the atom command?

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

like image 314
Yass001 Avatar asked Dec 03 '16 10:12

Yass001


People also ask

How do you run a shell command in an Atom?

Execute shell-it:open (default keybinding is shift-ctrl-alt-S ). Type in a shell command (such as sort ). Select which input and output streams you want. Hit enter.

How do you add commands to an Atom?

Just click the keyboard button in the top left of the terminal or set up a keymap to the atom-ide-terminal:insert-text command. Note: Make sure you have the Run Inserted Command toggle off otherwise it will run your inserted text.

How do I get the CMD Atom?

In that welcome screen, we are introduced to probably the most important command in Atom, the Command Palette. If you press Ctrl+Shift+P while focused in an editor pane, the command palette will pop up. Throughout the book, we will use shortcut keybindings like Ctrl+Shift+P to demonstrate how to run a command.


2 Answers

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.

like image 137
Dan Lowe Avatar answered Oct 26 '22 10:10

Dan Lowe


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.

like image 40
Fenris Avatar answered Oct 26 '22 10:10

Fenris