How to Migrate to Rocky Linux from CentOS, RHEL

Migrate to Rocky Linux

If you want to migrate from different distros like CentOS, RHEL, Oracle, or any other RedHat based on Rocky Linux then you can follow the below steps.


  • A hardware server or VPS
  • Linux Distros like CentOS, Alma Linux, RHEL, or Oracle Linux
  • Currently, the supported version of the above distros is 8.4
  • You should be aware of Linux Commands
  • It is essential to have SSH knowledge for remote servers
  • You must be a root user or a user with sudo privilege.


The migration is officially supported by Rocky Linux. They have created a set of commands for it. You can find that on git using the below link.


As per Rocky Linux Officially, It’s a script that, when executed, will change out all of your repositories to those of Rocky Linux. Packages will be installed and upgraded/downgraded as necessary, and all of your OS’ branding will change too.

Prepare your Server To Migrate To Rocky Linux

You have to install git using the below command

dnf install git

Now you can clone the rocky-tools repository using the below command

git clone

Note: this method will download all of the scripts and files in the rocky-tools repository.

Installation of Rocky Linux

If you have logged in to your server, then you can use the terminal to navigate to whatever folder contains the file.

Firstly, Change the permission to the file to make sure it is executable. So you can use the below command for that.

chmod +x

Secondly, you can execute the script,

./ -r

That -r the option tells the script to just go ahead and install everything.

If everything is in the right manner then you can see the terminal like as below.

Migrate To Rocky Linux

Now, it’ll take the script a while to convert everything, depending on the actual machine/server, and the connection it has to the wider internet.

If you see this message at the end, everything has gone right. So, reboot your server to finish the job.

Migrate to Rocky Linux
Migration update done, reboot your machine

Once the reboot is done, check your machine using the hostnamectl command.


And you will get an output similar to the below picture.

After reboot, you can check the status using hostnamectl


In this tutorial, you learned to migrate the machine from CentOS, and RHEL to Rocky Linux. So now you can enjoy using Rocky Linux. But if you have any queries then you always ask in the comment section.

Migrate to Rocky Linux | How to Migrate to Rocky Linux |

migrate centos 8 to rocky Linux | almalinux vs rocky Linux | convert centos 8 to rocky Linux | migrate to almalinux | migrate centos 7 to rocky Linux | rocky Linux vs ubuntu |

Leave a Reply