How to Install Deno on Ubuntu

The installer already telling you what to do after installation is finished:

Manually add the directory to your $HOME/.bash_profile (or similar)
export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"


export DENO_INSTALL="/root/.deno" 
export PATH="$DENO_INSTALL/bin:$PATH"

You can just run the two lines in the terminal directly to start using it in your current terminal or just edit and add them to $HOME/.bashrc or $HOME/.bash_profile (or similar)


Installing Deno by running the following command from it's official website

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

After installing it update .bashrc file in your profile directory:

sudo nano ~/.bashrc

then add these two lines in the file

 export DENO_INSTALL="/$HOME/.deno"
 export PATH="$DENO_INSTALL/bin:$PATH"

you can get this two lines from the message you get after installing deno after

finally run the following command source ~/.bashrc

after that run deno by typing this command in terminal deno

This video explain the installation process in details Installing deno on ubuntu


Open your terminal and run this

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

username: open termianla and run whoami

Now set path in .bashrc file

run nano .bashrc for open file and put below code with replacing with username

export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
export PATH="/home/username/.deno/bin:$PATH"

finally run the following command source ~/.bashrc

now run deno in your terminal

Tags:

Ubuntu

Deno