Skip to main content

How to Install Deno

· 2 min read

Deno is a JavaScript runtime that is built on the V8 JavaScript engine and the Rust programming language. It is built by Ryan Dahl, the author of Node.js.

At the time of writing, Deno just launched v1.0. Let us try to install Deno on our laptop.

My machine is a MacBook Pro. The official site lists many options to install Deno in different operating systems.

First, open the terminal. Execute the following command.

curl -fsSL https://deno.land/x/install/install.sh | sh

When we run the above command, Deno asks us to add some variables to the environment.

...
Manually add the directory to your $HOME/.bash_profile (or similar)
export DENO_INSTALL="/Users/<username>/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
Run '/Users/joby/.deno/bin/deno --help' to get started

As per the instructions, open .bash_profile in any editor. Add the following two lines as the last lines of the file.

export DENO_INSTALL="/Users/<username>/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"

Replace <username> with your machine username.

Now Deno is successfully installed on your machine. We can verify the installation by typing the following command in the terminal.

deno --version

We can see the following output if everything went well.

deno 1.0.2
v8 8.4.300
typescript 3.9.2