
Author: Dawid Adach
Goal
The goal of the following tutorial is to guide you on how to install all the software required to start our journey with Angular. If your environment is ready, you can skip to the next tutorial. However, if you never worked with Angular before this is a place to start from. The steps below will guide you on how to install all prerequisites respources regardless of the platform (Windows, macOS, Unix) you are using. Let's start!
1. Command line
The command line is crucial for every developer. If you haven't used it before then it's high time to get familiar with it. It might look complicated and difficult to learn, however, once you put your hands on it you will find that is a very powerful and useful tool.
How to run the command line?
Keyboard shortcut:
On your keyboard press: + R . You will see Run
windows. Type cmd
and click OK or press Enter

You will see a screen like that below:

That's it. You can now use a command line, however, please keep in mind that Windows Command Line is frankly speaking - crappy tool. That's why we strongly encourage you to use some alternative like GitBash (installation guide here). It has more Unix-like commands which are more user-friendly than built in windows commands.
How to run the command line?
Keyboard shortcut:
Press cmd ⌘ + space to open Spotlight search, type terminal
and hit Enter ⏎

You will see a screen like that below:

Unix unlike Windows or macOS, doesn't necessarily have a Graphic User Interface (GUI), therefore in some distributions like RedHat, CentOS, Debian, Ubuntu Server the terminal will launch immediately after booting up the machine.
In the case you use some GUI, they may look differently, however in most cases, you will find they will have a Windows-like "Start" button which will open search menu which allows you to find the terminal
app.
Sample start screen on Ubuntu:

Also terminal windows and colors may vary depends on distribution, here is sample Ubuntu terminal:

Since you know how to run the terminal, let's move to our runtime environment - Node.js.
2. Installing Node.js and the Node Package Manager (npm)
- Download the Windows installer from the Nodes.js® web site.
- Run the installer (the .msi file you downloaded in the previous step.)
- Follow the prompts in the installer (Accept the license agreement, click the NEXT button a bunch of times then accept the default installation settings).
- Restart your computer. You won’t be able to run Node.js® until you restart your computer.

- Download the MacOs installer from the Nodes.js® web site.
- Run the installer (the .pkg file you downloaded in the previous step.)
- Follow the prompts in the installer (Accept the license agreement, click the NEXT button a bunch of times then accept the default installation settings).

Ubuntu/Debian
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
Red Hat® Enterprise Linux® / RHEL, CentOS and Fedora
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo yum -y install nodejs
Arch Linux
pacman -S nodejs npm
3. Verifying the installation
It's time to check that we have Node and NPM installed correctly. We will simply run few commands to see what version of each is installed and to run a simple test program:
- Test Node: Open the command line and type:
This should print a version number, so you’ll see something like this:node -v
v8.9.1
- Test npm: To see if NPM is installed, type:
This should print NPM’s version number so you should see something like this:npm -v
5.5.1
- Verify JS: Create a file called
hello.js
and type inside:console.log("Hello world from MDB");
Open terminal, navigate to the folder where you have created a file and type
you should see the following output:node hello.js

Now let's get back to our current project.Click the NEXT LESSON button to proceed further.
Previous lesson Next lesson
Spread the word:
