17.6 C
Thursday, January 20, 2022

How To Install the Deno JavaScript Runtime on Ubuntu 20.04

Must read

Deno JavaScript is the newest product from the creator of NodeJs, and just like the NodeJs, Deno is also a runtime JavaScript working on V8 JavaScript, created for being secure from the start and supports typescript.

In this post today, you are going to learn how to install DenoJavaScript on the Linux distribution Ubuntu 20.04. We are going to update our packages, download Deno, install Deno and verify the installation of Deno JavaScript.

Step 1: Update Ubuntu and Packages

To install Deno JavaScript on Ubuntu 20.4 is to make sure that we are running the latest version of Ubuntu and we have all the packages up-to-date. We can do that by using the following commands in Ubuntu:

Step 2: Installing Unzip

The next step is to make sure that we have an unzipper on our machine, this is because the file that we are going to download to our machine is a zipped file; to install unzip utility you can use the following command:

You can see it in the image below:

Step 3: Downloading Deno.zip

Now that you have updated your system and installed an unzipper in your machine, we need to download deno.zip, for that head inside the folder in which you want to download the file using the following command:

Now, to download Deno use the following command

$ curl -Lo “deno.zip” “https://github.com/denoland/deno/releases/latest/download/deno-x86_64-unknown-linux-gnu.zip”

This command would start downloading the deno.zip from its Github, after executing the command you should see a progress bar like:

If curl is not installed then install it using the command provided below:

Step 4: Installing Deno

After downloading Deno, we need to unzip it inside a folder with the following command:

$ sudo unzip -d /usr/local/bin /tmp/deno.zip

This above command will unzip/install the Deno javascript in the /usr/local/bin folder, the next thing we need to do is to make sure the root and owner permission is correct, to verify that use the following command:

$ ls -al /usr/local/bin/deno

You should see the following output on the terminal:

Step 5: Verifying Installation

To verify the installation of Deno JavaScript you can use the following command to check the version of the Deno JavaScript.

You should see the following output:

Step 6: Testing DenoJs

In order to use Deno and execute a basic Hello World we are going to use the Deno REPL with the following command:

And then we use the following command:

[‘hello’, ‘world’].join(‘ ‘)

You will see the below-mentioned output on your screen:

That is it, you have installed Deno JavaScript on Ubuntu 20.04


Deno JavaScript can be installed by downloading “deno.zip” from their official Github Repository and extracting it in your desired directory. Following this step-by-step guide, you have learned how to install the Deno JavaScript on Ubuntu 20.04 and even tested a simple hello world program using Deno REPL. Deno is a runtime JavaScript which is running on V8 JavaScript.

Source link

- Advertisement -

More articles


Please enter your comment!
Please enter your name here

- Advertisement -

Latest article