Follow
Ubuntu Linux

Install Angular CLI on Ubuntu: A Step-by-Step Guide

Richard
Written by
Richard
Jun 28, 2022 Updated Apr 18, 2026 2 min read
How to Display Seconds on Ubuntu Top Menu Clock
How to Display Seconds on Ubuntu Top Menu Clock

You install the Angular CLI on Ubuntu to streamline your Angular development workflow by providing command-line tools for creating, building, and managing projects.

The Angular CLI, a powerful command-line interface, simplifies tasks like generating new components, running your application locally, and deploying it.

This guide walks you through installing Angular CLI version 17 on your Ubuntu system, ensuring you’re ready to build modern web applications efficiently.

⚡ Quick Answer

Install Angular CLI on Ubuntu by first installing Node.js with NVM, then running npm install -g @angular/cli. Verify the installation with ng version.

How to install and use Angular CLI on Ubuntu Linux

We recommend using NVM (Node Version Manager) to install Node.js. This avoids using “sudo” for global installs, which keeps your system secure.

First, open your terminal. Run this command to install NVM from the official source:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

After installing NVM, you need to refresh your profile so the terminal recognizes the new command: source ~/.bashrc

Next, install the latest Long Term Support (LTS) version of Node.js. LTS versions are generally recommended for stability. In 2026, this is version 22 install Node.js:

nvm install 22

Verify your installation by checking the versions of Node and NPM Node.js version 16 LTS:

node -v

npm -v

Now, install the Angular CLI globally using NPM:

npm install -g @angular/cli

Modern Angular Development

Newer Angular versions are much faster. The CLI now uses advanced build tools, like Esbuild, which helps your development server start almost instantly.

To create a new project, use the standard command:

ng new my-first-project

Modern Angular projects now default to “Standalone” components. This approach means you won’t typically need the old NgModules, making your code cleaner and simpler to manage.

Check your version to confirm everything is ready:

ng version

Terminal window showing the process to install Angular CLI on Ubuntu
angular cli on ubuntu linux

Running your project

Move into your project folder and start the server:

cd my-first-project

ng serve

Open your web browser and go to http://localhost:4200/ to see your app running.

Command line interface creating a new Angular project on Ubuntu Linux
angular cli first project on ubuntu linux

When you run the ng serve command, the CLI watches your files. Every time you save a change, the browser will update automatically.

Conclusion

By following these steps, you’ve got a modern setup with NVM and the latest Angular tools. You’re now ready to build fast, efficient web applications on Ubuntu.

If you’re curious about all the available versions, you can check them out here: https://github.com/angular/angular-cli/releases

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Install GNOME Desktop on Ubuntu 24.04
Ubuntu Linux How to Install GNOME Desktop on Ubuntu 24.04
How to Create a New Git Branch on Ubuntu
Ubuntu Linux How to Create a New Git Branch on Ubuntu
How to Install Conda on Ubuntu 24.04: A Step-by-Step Guide
Ubuntu Linux How to Install Conda on Ubuntu 24.04: A Step-by-Step Guide
How to Install ELK Stack on Ubuntu Linux
Ubuntu Linux How to Install ELK Stack on Ubuntu Linux

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *