Welcome to our guide on how to install R & RStudio on CentOS 8 / RHEL 8 Linux. R is a popular programming language used for graphical representation of data and statistical computing. If you are a full time R developer, you’ll need a version of IDE. This is where RStudio come in. RStudio is a set of integrated tools designed to help R developers be more productive and efficient.

Rstudio comes with robust tools for plotting, viewing history, debugging and managing your workspace. Two versions of RStudio are available – open source or commercial. Pick the version that works best for your business needs.

Features of RStudio

  • Runs on Windows, Linux, and macOS
  • Syntax highlighting, code completion, and smart indentation
  • Integrated support for Git and Subversion
  • Execute R code directly from the source editor
  • Quickly jump to function definitions
  • Easily manage multiple working directories using projects
  • Integrated R help and documentation
  • Interactive debugger to diagnose and fix errors quickly
  • Extensive package development tools
  • Support for interactive graphics with Shiny and ggvis
  • Supports authoring HTML, PDF, Word Documents, and slide shows

By choosing the commercial edition, you get additional features such as Access to priority email support and 8 hour response during business hours (ET). Learn more about RStudio editions and features.

Install R & RStudio on CentOS 8 / RHEL 8

Now that we’ve covered the basics of R and RStudio, let’s now proceed to actual installation. Ensure the system is updated before you continue.

sudo yum update

Once the system is updated, add the EPEL repositories:

--- CentOS 8 ---
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf config-manager --set-enabled PowerTools

--- RHEL 8 ---
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo ARCH=$( /bin/arch )
sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"

Install R on CentOS 8 / RHEL 8 Linux:

We’ll use an automated script to install R on CentOS 8 / RHEL 8 Linux system.

sudo bash -c "$(curl -L https://rstd.io/r-install)"

It will show you all the available versions of R, you can select specific version from the list to install.

Available Versions
Enter version to install: (<ENTER> for latest)

To install the latest version, just hit the <Enter> key.

Transaction Summary
Install  30 Packages

Total size: 134 M
Total download size: 77 M
Installed size: 329 M
Is this ok [y/N]: y

Print the current version of R installed.

/opt/R/${R_VERSION}/bin/R --version

You can add the path to R binary to your $PATH.

$ vim ~/.bashrc
export PATH=$PATH:/opt/R/${R_VERSION}/bin/R --version

Where ${R_VERSION} is the version of your R installed. In my case this will be:

export PATH=$PATH:/opt/R/3.6.3/bin/

Source the bashrc file and confirm:

$ source .bashrc 
$ which R
$ R --version
R version 3.6.3 (2020-02-29) -- "Holding the Windsock"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see

Install RStudio on CentOS 8 / RHEL 8:

Now visit the  RStudio downloads page to grab the latest release of RStudio for RHEL / CentOS Linux.

sudo yum -y install wget
wget https://download1.rstudio.org/desktop/fedora28/x86_64/rstudio-1.2.5042-x86_64.rpm

Install the RPM package downloaded using yum or rpm command.

sudo yum localinstall ./rstudio-1.2.5042-x86_64.rpm

Agree to install RStudio on RHEL / CentOS 8 Linux.

Dependencies resolved.
 Package           Architecture     Version              Repository              Size
 rstudio           x86_64           1.2.5042-1           @commandline           115 M

Transaction Summary
Install  1 Package

Total size: 115 M
Installed size: 582 M
Is this ok [y/N]: y

Launch RStudio from CLI or Desktop environment and start your R Development.

rstudio ui

More Dev related content for CentOS / RHEL 8 Linux.

Install Apache Cassandra on CentOS 8 Linux

How To Install Java 11 (OpenJDK 11) on RHEL 8 / CentOS 8

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here