Skip to content

Installing Rocky Linux 9

A detailed guide on installing rocky linux is available at:

Download and verify ISO

  1. Download using wget:

  2. Check validity of ISO

    sha256sum -c CHECKSUM --ignore-missing
  3. Make bootable USB

    sudo dd if=/path/to/iso.iso of=/dev/sdX status=progress

    Change /path/to/iso and /dev/sdX appropriately. Use lsblk or diskutil list (macos) to find available drives.

Install OS using anaconda

Follow the instructions shown. Setup keyboard, language, drive, softwares, network, hostname, time & date, root password and default user. Make sure to give administrator privileges to default user.

Installing Graphical environment (Gnome)

sudo dnf group list
sudo dnf groupinstall "Workstation"
sudo dnf groupinstall "Server with GUI"
sudo systemctl set-default graphical
sudo reboot

Install CUDA drivers and cudatoolkit

A detailed instruction is available at: cuda-installation-guide-linux.

  1. Install development tools, kernel, libraries

    sudo dnf config-manager --set-enabled crb # codeready-builder
    sudo dnf group install -y "Development tools"
    sudo dnf install epel-release rpmfusion-free-release # extra and free
    sudo dnf install -y kernel-devel kernel-headers
  2. Instructions from Nvidia Cudatoolkit:

    sudo dnf config-manager --add-repo
    sudo dnf clean all
    sudo dnf -y module install nvidia-driver:latest-dkms
    sudo dnf -y install cuda
  3. Post-installation setup

    Append to bash environment:

    export PATH=/usr/local/cuda-11.8/bin${PATH:+:${PATH}}
    export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64\
  4. Install third-party libraries

    sudo dnf install libX11-devel libXi-devel libXmu-devel make mesa-libGLU-devel freeimage-devel
    sudo dnf --enablerepo=devel install freeglut-devel
  5. Verify cuda environment

    Download cuda samples, compile and run deviceQuery.

Setup terminal environment

  1. Install zsh

    sudo dnf install zsh
  2. (Optional) setup and customizations

    • ohmyzsh:
    • nordtheme:
    • Fira code fonts:

Install libraries, apps, tools

  1. Monitoring apps

    sudo dnf install htop btop glances
  2. Build tools

    sudo dnf install libdrm-devel systemd-devel
    sudo dnf install cmake ncurses-devel git gcc-c++
    sudo dnf install qt5-qtdeclarative


    sudo dnf install gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig # programming

  3. Audio/Video dependencies

    sudo dnf install vlc ffmpeg ffmpeg-devel
  1. Setup FlatHub repo:

    sudo dnf install flatpak
    flatpak remote-add --if-not-exists flathub
    sudo reboot
  2. Install vscode, spotify, etc.

    flatpak install flathub com.spotify.Client
    flatpak install flathub com.slack.Slack
    flatpak install flathub us.zoom.Zoom

Setup python environment

Install a conda environment using mambaforge:

More info

  • CRB: (CRB is "Code Ready Builder" - PowerTools was a carryover from CentOS, which is still the equivalent of CRB in RHEL. crb will be the repository name going forward in Rocky Linux and other derivatives.) More info

Additional resources:


Last update: November 6, 2022