Install the Dart SDK on Linux

The steps of Dart installation on Linux is given below.

Before installing the Dart, if you are Debian/Ubuntu on AMD64(64-bit Intel) in your local machine, you can install the Dart through one of the following options.

  • Install using apt-get
  • Install a Debian package

Installation using apt-get

Step -1: Type the following commands for a one-time setup.

  1. $sudo apt-get update  
  2. $ sudo apt-get install apt-transport-https  
  3.   
  4. $ sudo sh -c ‘wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -‘  
  5.   
  6. $ sudo sh -c ‘wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list’  

Step – 2: Type the following command in terminal to install the Dart SDK using apt-get option.

  1. $sudo apt-get update  
  2. $ sudo apt-get install dart  

It will successfully download the Dart SDK.

Installation a Debian Package

We can download Dart SDK as a Debian package in the .deb package format. To make all Dart binaries accessible, we have to change the PATH by typing the following command.

  1. export PATH=”$PATH:/usr/lib/dart/bin”  

To change the PATH for upcoming terminal sessions, use a below command:

  1. $ echo ‘export PATH=”$PATH:/usr/lib/dart/bin”‘ >> ~/.profile  

Leave a comment

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