-
Notifications
You must be signed in to change notification settings - Fork 285
Just Enough Command Line for Installing
This is your friend.
It goes by various names: terminal, command line, bash, shell, PowerShell; and looks a little different in each operating system.
Window’s Command Prompt | Mac OS X’s Terminal |
In Windows: In the Search box, type "Command Prompt", then in the list of results, double-click Command Prompt. |
In OS X: Open the Applications folder and then the Utilities folder. Click on Terminal.app |
|
Terminal.app |
The lowest line in the terminal displays the current working directory--the folder that can be affected by any commands that are entered at the command line.
Following the current working directory is a character that indicates where the command line begins. This is the command prompt. In Windows, it is the greater-than sign: >
; in OS X and Linux, it is a dollar sign: $
.
Regardless of which operating system is being used, coding instructions sometimes indicate a command by preceding it with the dollar sign.
$ npm install -g grunt-cli
The dollar sign is not typed as part of the command.
After typing your command on the command line, press Enter or Return.
Sometimes the commands you run in the terminal need to be run by a user with elevated permissions...
In Windows:
The technique you use will depend on your version of Windows. This guide explains different ways to open a command prompt as administrator in Windows.
In OS X:
Open a terminal in the usual way.
Begin your command with sudo
followed by a space, as in the following example.
sudo npm install -g grunt-cli
If sudo does not work, consult your systems administrator.
Generally speaking, the program will report back with an error message or tell you that the command was not recognized. Read through the message to determine if it was caused by an innocuous typo or by something more serious. If simply a typo, retype your command and try again.
When a command finishes, it returns control to the command prompt. The command prompt will reappear, and you’ll be able to enter another command. Sometimes a command starts a process that seems to get stuck or encounters an error. It does not look like it will ever return to the command prompt.
To interrupt a process, press: Ctrl+C
Take responsibility for your own actions because using this command in certain circumstances can have undesirable consequences, such as computer crashes and lost data.
Most often a command needs to be run within the folder that contains the file that understands the command. In other words, the current working directory associated with the command prompt needs to be the folder that contains that file. If it is not, you need to navigate to it.
ls
(in OS X and Linux)
dir
(in Windows)
cd directory-name
cd directory-name/subdirectory-name
$ cd ..
Use the keyboard's up and down arrows.
$ exit
If a program is installed, it typically has the ability to report its version number. If it is not installed, your computer will not recognize the commands.
The following commands will return version numbers for key programs used by Adapt.
git --version
node --version
nodist --version
nvm --version
npm --version
ffmpeg --version
mongod --version
grunt --version
adapt --version