Since CentOS kind of went off the rails over a year ago, some admins and companies have been searching for a replacement. Many hopped onto the AlmaLinux train, while others opted to go with Rocky Linux. Both are absolutely outstanding distributions that should be worth your attention and time.
But there are other alternatives, one of which has actually been around for some time. That alternative is Virtuozzo Linux (also known as VzLinux), which is free to download and use. It’s 1:1 binary compatible with Red Hat Enterprise Linux (RHEL), and offers three different versions that are optimized for running containers, virtual environments or bare metal. VzLinux behaves very much like the CentOS you’ve known and loved (only without the GUI).
But VzLinux also includes a handy trick that could possibly make the lives of admins and companies a bit easier. This trick makes VzLinux a sort of chameleon.
Let me explain.
SEE: Checklist: How to manage your backups (TechRepublic Premium)
There are certain tools out there (such as cPanel) that only support specific distributions. When you run into such a piece of software, and you’re using a distribution it won’t install on (such as CentOS Stream), you’re out of luck. That software simply will not install.
That’s where VzLinux has a bit of an advantage. With the help of a built-in command, you can mask VzLinux to present itself as another OS (such as CentOS or RHEL). What that command does is rewrite the /etc/os-release file such that it reads to third-party software as if it’s a completely different OS.
Let me show you how to use this tool.
What you’ll need
In order to work with chameleon mode, you’ll need a running instance of VzLinux (such as VzLinux 8 or VzLinux 9) and access to the root user account (or a user with sudo privileges). That’s it. Let’s get masking.
How to enable chameleon mode
Log into your running instance of VzLinux as either the root user or a user with sudo privileges. Let’s say you want to install a piece of software that will only install on RHEL. By default, VzLinux presents as VzLinux, so the os-release file might read:
So let’s enable chameleon mode and set it to RHEL. For that, you’d issue the command:
vz-chameleon-distro --enable rhel
The command will complete almost instantly. To check the results, issue the command:
You should now see the os-release file reads something like this:
PRETTY_NAME=”Red Hat Enterprise Linux 9.0 (Ootpa)”
REDHAT_BUGZILLA_PRODUCT=”Red Hat Enterprise Linux 9″
REDHAT_SUPPORT_PRODUCT=”Red Hat Enterprise Linux”
You could change that to CentOS with the command:
vz-chameleon-distro --enable centos
Or, you could change it back to VzLinux by disabling chameleon mode with the command:
And that’s all there is to masking VzLinux as a different distribution. If you run into a situation where you either need a distribution capable of masking itself as another, this might well be what you’re looking for. Is this an addition that will have you jumping ship from your current Linux server distro? Probably not. But if you’re looking for an alternative that can present itself as alternatives, this is a great place to start.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.