How to install Deno on Ubuntu (Linux)
Deno, the successor of Node.js, is now stable with it’s v1.0 release.
- Secure by default. No file, network, or environment access (unless explicitly enabled).
- Supports TypeScript out of the box.
- Ships a single executable (
- It has built-in utilities like a dependency inspector (
deno info) and a code formatter (
- It has a set of reviewed (audited) standard modules that are guaranteed to work with Deno.
Looking at all these features, it was pretty tempting for me to try it out, and now that it’s stable, why not? Let’s jump into it.
You may also like: Node.js vs Deno — A high-level comparison
Installing Deno on Ubuntu 18.04
I’m using Ubuntu 18.04 as my primary OS and I have got Homebrew installed on it. So, I’ve tried installing Deno first using Homebrew…
$ brew install deno
But unfortunately, I ended up with the following error which is an existing issue with Homebrew itself.
deno: macOS is required. Error: An unsatisfied requirement failed this build.
So, I had to switch to another way which was using curl. I ran the following commands.
$ cd ~ $ curl -fsSL https://deno.land/x/install/install.sh | sh
And that has successfully installed Deno…
But there was still some work left. The issue was if I try to get info using command
deno --version, nothing came. It was because, I haven’t specified Deno’s install path into the terminal’s
.bash_profile in some other Linux flavors).
So, I added following lines into
.bashrc (which was there in the
home in my case),
export DENO_INSTALL="/home/amitmerchant/.deno" export PATH="$DENO_INSTALL/bin:$PATH"
I saved it, restarted the terminal, and ran
deno --version and boom… it has started working like a charm!