Install R on any Linux Distro (Debian, Fedora/Redhat, Ubuntu)

Written by
Editors
Updated on
May 10, 2023
Install R on any Linux Distro (Debian, Fedora/Redhat, Ubuntu)
Subscribe to our newsletter
Read about our privacy policy.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

R is an open-source programming language mainly used by statisticians and data scientists to perform statistical analysis. It is great for statistical computing, with robust features for generating detailed statistical visualizations.

The R packages included in the default repositories are often outdated. We will install the latest R package from the CRAN repository.

New article — Lightweight Linux Distros perfect for older hardware.

How to Install R on Linux Distros (Debian, Fedora/Redhat, Ubuntu)

This guide covers the 4 specific ways to install R on Linux distributions.

System Requirements

  • RAM— 1 GB required, 2 GB recommended.
  • a non-root with sudo privileges on the user account.

1. Install R from the terminal

Type in the following commands in terminal.

Install dependencies

sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common

Add the CRAN repository to your system

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

Install R by typing

sudo apt install r-base

Verify the R version

R --version

2. Download via Homebrew

You can download R by typing a homebrew command:

brew install r

3. Download via XCode

Type the following command to install R through XCode:

xcode-select --install

4. Download R with the Web Browser

You can get the latest R package from cran.r-project.org

That’s it!

You are ready.

Trending Stacks

Please bear with us, an update is coming soon.
Data Engineering
Master Data Engineering with these powerful tools, techniques, and resources.
Data Science
Discover a wealth of data science resources to elevate your analytical skills.
Cloud Computing
Elevate your cloud computing skills with up-to-date resources.
Fortnight Reads
We care about your data in our privacy policy.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
© 2023 kanger.dev. All rights reserved.