Rocky Linux (CLI) in Termux – Installation Commands & Setup Guide

Rocky Linux is a free and enterprise-grade Linux distribution that is designed to be compatible with Red Hat Enterprise Linux (RHEL). It is known for its stability, security, and long-term support, making it a popular choice for servers, development environments, and Linux learning. You can also install and use Rocky Linux on Android devices using the Termux application without root access.

Here’s what you can do with Rocky Linux in Termux:

  • Learn Rocky Linux commands.
  • Practice Linux administration tasks.
  • Install development tools and packages.
  • Run CLI-based Linux applications.
  • Explore enterprise Linux environments.
  • Learn Red Hat compatible Linux systems.

What is Rocky Linux?

Rocky Linux is an open-source enterprise Linux distribution created as a replacement for CentOS. It is a stable and secure operating system that is widely used by developers, system administrators, and organizations around the world.

Requirements to install Rocky Linux

Before installing Rocky Linux in Termux, make sure your device meets some basic requirements for smooth performance and proper setup.

  • Processor required: 64-bit CPU (ARM64 recommended).
  • Internet data required: Approx 300MB – 400MB.
  • Free storage: Minimum 3GB.
  • Android version: Android 7.0 or above.
  • RAM: Minimum 2GB.
  • Required installation time: Approx 15-30 minutes.

Install Rocky Linux in Termux

Below are the simple commands to install Rocky Linux in Termux. Follow each command carefully to download, install, and setup Rocky Linux successfully. Open Termux and run these commands one by one.

Update Termux packages first.

pkg update && pkg upgrade -y

Install the proot-distro package.

pkg install proot-distro -y

Install Rocky Linux 9.

proot-distro install rockylinux:9

The installation process may take a few minutes depending on your internet speed.

Setup Rocky Linux

Login to Rocky Linux after installation.

proot-distro login rockylinux

Update all Rocky Linux packages.

dnf update -y

Install basic tools.

dnf install wget curl git nano vim -y

Rocky Linux is now ready to use inside the Termux terminal.

Usage Commands

As we install Rocky Linux CLI in Termux terminal application, it needs commands to manage and use the Linux environment.

Start to Rocky Linux anytime in Termux.

proot-distro login rockylinux

Update installed packages.

dnf update -y

Enables the EPEL repository which contains additional packages.

dnf install epel-release

Install a new package.

dnf install package-name

Search for available packages.

dnf search package-name

Remove a package.

dnf remove package-name

Check Rocky Linux version.

cat /etc/os-release

Exit Rocky Linux.

exit

End Note

Rocky Linux is a stable and enterprise-grade Linux distribution that can be installed directly on Android using the Termux application. It provides a complete command-line Linux environment for learning Linux, practicing administration tasks, and running different Linux tools without requiring root access.

SHARE THIS POST: