logo

How to Install R on Ubuntu 📂R

How to Install R on Ubuntu

Guide

Step 1.

Press Ctrl+Alt+T to open the console window.


Step 2.

Enter the following in the console window.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

Administrator privileges are required, so you need to enter the password for your user account.


Step 3.

Enter the following in the console window.

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'

Step 4.

Enter the following in the console window.

sudo apt update

Step 5.

Enter the following in the console window.

sudo apt install r-base

*Step 6.

To check if it has been installed successfully, enter the following in the console window.

sudo -i R

,2019-03-0712-42-56.png

If R has been installed correctly, the R console will be executed in the terminal as shown in the screenshot above.

Environment

  • OS: Ubuntu 18.04
  • Version: 3.5.2