Installing rig
Some of the methods below install rig itself into your home directory, others system-wide. That choice is independent of the mode rig installs R in: rig defaults to admin mode either way, and you switch to user mode explicitly with rig system user-mode. Admin mode is the older and better tested mode, so if you have an administrator account and no reason to keep R in your home directory, you can skip that step.
Method 1: user install (command line rig only)
Use our install script, which downloads the right build for your Mac, unpacks it into ~/.local, and adds ~/.local/bin to your PATH:
curl -LsSf https://r-lib.github.io/rig/install.sh | shThen install R. rig still defaults to admin mode, which installs R system-wide; add the first command below to keep R in your home directory too (user mode):
rig system user-mode
rig add releaseAlternatively, download the rig-macos-<arch>-<version>.tar.gz archive for your architecture (arm64 or x86_64) from https://github.com/r-lib/rig/releases and unpack it into ~/.local yourself:
mkdir -p ~/.local
curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-macos-arm64-latest.tar.gz |
tar xz -C ~/.localMake sure ~/.local/bin is on your PATH. The binary in these archives is signed and notarized, so it runs without Gatekeeper warnings.
Method 3: system install with Homebrew
Command line app only:
brew install r-rigYou can use x86_64 rig on Arm macs, and it will be able to install Arm builds of R. But you cannot use Arm rig on Intel macs. If you use both brew versions, only install rig with one of them.
To update rig you can run
brew upgrade r-rig-appMethod 1: user install (no admin rights needed)
If you don’t have administrator rights, you can install rig into your user profile with the install script. It downloads the right build, unpacks it into %USERPROFILE%\.local, and adds %USERPROFILE%\.local\bin to your user PATH:
irm https://r-lib.github.io/rig/install.ps1 | iexOpen a new terminal, then install R. rig still defaults to admin mode, which installs R system-wide; add the first command below to keep R in your user profile too (user mode):
rig system user-mode
rig add releaseAlternatively, download the rig-windows-<arch>-<version>.zip archive (x86_64 or arm64) from https://github.com/r-lib/rig/releases and extract it into %USERPROFILE%\.local, then add %USERPROFILE%\.local\bin to your PATH.
Method 2: system install
Download the latest release from https://github.com/r-lib/rig/releases and install it the usual way.
rig adds itself to the user’s path, but you might need to restart your terminal after the installation on Windows.
Method 3: Scoop
If you use Scoop, you can install rig from the scoop bucket at cderv/r-bucket:
scoop bucket add r-bucket https://github.com/cderv/r-bucket.git
scoop install rigTo update run
scoop update rigMethod 4: Chocolatey
If you use Chocolatey (e.g. on GitHub Actions) you can install rig with
choco install rigand upgrade to the latest version with
choco upgrade rigMethod 5: WinGet
An easy way to install rig on Windows 10 and above is to use the built-in WinGet package manager. The name of the package is posit.rig.
winget install posit.rigOn Linux you can install rig into your home directory without administrator rights, or system-wide from a DEB or RPM package, or from a tarball. See the supported distributions below for admin mode rig. In user mode rig runs on any glibc (>=2.28) or musl (>=1.2) based Linux.
Method 1: User install (no admin rights needed)
Use our install script, which downloads the right build for your machine, unpacks it into ~/.local, and adds ~/.local/bin to your PATH:
curl -LsSf https://r-lib.github.io/rig/install.sh | shThen install R. rig still defaults to admin mode, which installs R system-wide; add the first command below to keep R in your home directory too (user mode):
rig system user-mode
rig add releaseAlternatively, download the rig-linux-<arch>-<version>.tar.gz archive for your architecture (x86_64 or aarch64) from https://github.com/r-lib/rig/releases and unpack it into ~/.local yourself:
mkdir -p ~/.local
curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-linux-$(arch)-latest.tar.gz |
tar xz -C ~/.localMake sure ~/.local/bin is on your PATH.
Method 2: Ubuntu and Debian (DEB package)
On any Ubuntu or Debian distro, you can use our package repository to install rig. First you add our key to your config:
`which sudo` curl -L https://rig.r-pkg.org/deb/rig.gpg -o /etc/apt/trusted.gpg.d/rig.gpgThen add the rig repository:
`which sudo` sh -c 'echo "deb http://rig.r-pkg.org/deb rig main" > /etc/apt/sources.list.d/rig.list'If you already added both the key and the repository, then install the r-rig package (rig is a different package in Debian and Ubuntu):
`which sudo` apt update
`which sudo` apt install r-rigMethod 3: RHEL, Fedora, Rocky Linux, Almalinux, etc. (RPM package)
On most RPM based distros (except for OpenSUSE and SLES) you can install our RPM package directly:
`which sudo` yum install -y \
https://github.com/r-lib/rig/releases/download/latest/r-rig-latest-1.$(arch).rpmMethod 4: OpenSUSE and SLES (RPM package)
On OpenSUSE and SLES use zypper instead of yum:
`which sudo` zypper install -y --allow-unsigned-rpm \
https://github.com/r-lib/rig/releases/download/latest/r-rig-latest-1.$(arch).rpmMethod 5: Any Linux distribution (tarball)
Download the latest release from https://github.com/r-lib/rig/releases and uncompress it to /usr/local
curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-linux-$(arch)-latest.tar.gz |
`which sudo` tar xz -C /usr/localOnce rig is installed, the tutorials walk you through installing R, switching between versions and installing packages.
Supported Linux distributions
- Debian 12, 13
- Ubuntu 20.04, 22.04, 24.04, 26.04
- Fedora Linux 43, 44
- OpenSUSE 15.6, 16.0
- SUSE Linux Enterprise 15 SP6
- Red Hat Enterprise Linux 7, 8, 9, 10
- AlmaLinux 8, 9, 10
- Rocky Linux 8, 9 10
Retired Linux distributions
These are not updated any more, no new R builds are added for them, but existing R builds still work.
- CentOS 6 (only x86_64, last R version: 4.0.4),
- CentOS 7 (last R version: 4.4.3),
- CentOS 8 (last R version: 4.4.3),
- Debian 9 (last R version: 4.2.1),
- Debian 10 (last R version: 4.4.3),
- Fedora 37 (last R version: 4.3.2),
- Fedora 38 (last R version: 4.4.2),
- Fedora 39 (last R version: 4.4.3),
- Fedora 40 (last R version: 4.5.1),
- Fedora 41 (last R version: 4.5.3),
- Fedora 42 (last R version: 4.6.1),
- OpenSUSE 42 (only x86_64, last R version: 4.2.1),
- OpenSUSE 15.1 (only x86_64, last R version: 4.1.2),
- OpenSUSE 15.2 (only x86_64, last R version: 4.1.3),
- OpenSUSE 15.3 (last R version: x86_64: 4.4.3, aarch64: 4.3.1),
- OpenSUSE 15.4 (last R version: 4.4.0),
- OpenSUSE 15.5 (last R version: 4.4.3),
- SUSE Linux Enterprise 15 (only x86_64, last R version: 4.1.2),
- SUSE Linux Enterprise 15.1 (only x86_64, last R version: 4.1.2),
- SUSE Linux Enterprise 15.2 (only x86_64, last R version: 4.1.3),
- SUSE Linux Enterprise 15.3 (last R version: x86_64: 4.4.3, aarch64: 4.3.1),
- SUSE Linux Enterprise 15.4 (last R version: 4.4.0),
- SUSE Linux Enterprise 15.5 (last R version: 4.4.3),
- Ubuntu 16.04 (only x86_64, last R version: 4.1.2),
- Ubuntu 18.04 (last R version: 4.3.1).
We use Linux builds or R from the Posit R-builds project.
Installing auto-complete
All rig installers and archives ship shell completion files.
macOS and Linux
The macOS and Linux installers install completion files for zsh and bash into system locations.
zsh completions work out of the box.
For bash completions install the bash-completion package from Homebrew or your Linux distribution and make sure it is loaded from your .bashrc. (You don’t need to install bash from Homebrew, but you can if you like.)
For user-mode installs the completion files are placed under the install prefix instead (e.g. ~/.local/share):
zsh: add~/.local/share/zsh/site-functionsto yourfpath(beforecompinit).bash:bash-completionpicks up~/.local/share/bash-completion/completionsautomatically once it is loaded from your.bashrc.
Windows
The Windows installer and archive ship a PowerShell completion script. To enable tab-completion, dot-source it from your PowerShell profile ($PROFILE). For a user-mode archive install that is:
. "$env:USERPROFILE\.local\share\rig\_rig.ps1"