Choosing the perfect Linux distribution to set up your server can be confusing since Linux provides a limitless number of options. The main reason behind these many distributions is because Linux is an opensource platform. Anybody with the required skills can contribute to the development or build and release their distribution. Currently, there are more than 600 Linux Desktop and Server distributions in the market.
Despite these many distributions, there are two principal Linux server distributions dominant in the market – CentOS and Ubuntu Server. Both are excellent choices for a server, and they both have their advantages over the other.
In this CentOS vs. Ubuntu comparison, we will look at the key features of both operating systems to guide you in choosing the right distributions for your Virtual Private Server.
Before shedding light on these two well-matched opponents’ features and services, let’s have a brief look at each of them.
Overview of CentOS
CentOS is an open-source Linux distribution based on RHEL or Red Hat Enterprise Linux. Red hat is a popular name in the industry and widely-supported distro by lots of corporate IT applications.
First released in May 2004, CentOS is an enterprise-class operating system whose overall development is supported by the community. Its close relation to RHEL has given it a lot more amazing features from Red Hat.
CentOS is highly stable and secure. That is made possible by the fact that CentOS enjoys official support from Red Hat. It is also highly customizable to fit your needs.
Overview of Ubuntu Server
The Ubuntu Server is developed by Canonical and open source developers around the world. It is based on Debian architecture. Since its first release in 2004, Ubuntu has been a perfect choice for personal and professional use. It’s an opensource operating system that gets frequent updates to fix any identified bugs.
Ubuntu is one of the easy to use Linux distro even for a newbie. It has excellent developers’ community support with a high probability that any issue arising is likely solved somewhere online.
CentOS vs. Ubuntu – Main Differences
Now let’s look at the difference between the two distributions.
1. System Core
That is one of the main differences between the two. While CentOS is forked from Red Hat Enterprise Linux (RHEL), Ubuntu is Debian-based.
2. Package management
Since both distributions are based on a different operating system, a difference in package management is expected. CentOS uses the yum command while Ubuntu Server uses apt or apt-get (for older distributions) to download and install packages.
The difference in package managers might have an impact on which distribution to go for. If you are an RHEL user, then CentOS will seem quite familiar. The same case for Ubuntu if you are a Debian user. However, if you are just getting started with Linux operating systems, the package managers shouldn’t be an issue.
3. Security, stability, and updates
Unlike Ubuntu Server, where we have regular updates and upgrades, CentOS has less frequent updates. This feature has made the latter to be considered more stable than Ubuntu. However, it also poses a drawback for CentOS as you can’t access new third-party software and packages from the CentOS official repository. You will have to download them manually. However, this doesn’t mean Ubuntu is unstable or secure – it is comparatively less stable than CentOS.
In terms of security, both systems try to provide top-notch security features.
CentOS comes pre-installed with SELinux (Security-Enhanced Linux). It’s a security mechanism available in kernels of Linux distributions like CentOS, RHEl, and Fedora Linux.
SELinux manages the overall server security by applying restrictions on how requests are processed in a server and define how users interact with sockets, ports, and directories. Additionally, SELinux enables obstructing software packages installation and can also terminate a running process on regular use.
On the other hand, Ubuntu enhances security using the AppArmor (Application Armor). AppArmor is a Kernel Security feature available for distributions like Ubuntu, Debian, and OpenSUSE. It manages server security restricting program capabilities with the per-program profile. Each program profile can allow or deny socket access, network access, and overall file permissions (Read, Write, and Execute).
Considering these two security features, SELinux seems to be much more complete and an ambitious security tool than AppArmor. While AppArmor lets you define a particular program’s capabilities and what it can or not do, SELinux is a vast universe. It permeates everything, giving the entire system a more sophisticated security infrastructure. It allows you to implement the main security paradigms in access control theory.
4. Release Cycle
CentOS has a longer release cycle and a much longer support cycle. CentOS 6, for example, was first released in 2010 and will be supported until November 2020 with five (5) minor point releases. On the other hand, Ubuntu has Long Term Support (LTS) releases, which are released every two years. These LTS releases are supported for up to 5 years.
If you are a user who values consistency and long support cycle, then CentOS is for you. And now that it is officially a part of Red Hat, it makes an excellent choice.
5. Web Hosting Services
Currently, (as of 7/2020), the popular operating systems used for Web Hosting Services are Ubuntu, Debian, and CentOS. Even though statistics show that Ubuntu server usage in hosting services is mainly for small and medium-sized business sites/servers, there is still a catch.
The large volume of servers using Ubuntu-Server OS’s for hosting services has proved the dominance of Ubuntu Server in the Hosting market. The graphs below from Google Trends and Stack exchange provide a graphical representation of the comparison between these two OS.
If you are looking forward to using a control panel for your web hosting services, then CentOS would be a reliable option. That is because it offers several management panels necessary for hosting web management. They include; cPanel, Webmin, and DirectAdmin. These control panels are only available for RedHat systems like the CentOS.
Ubuntu doesn’t support the cPanel but comes with other alternatives like Webmin/Virtualmin and VestCP.
CentOS updates are not as regular as those of Ubuntu. That is an additional reason for its stability, but it also poses a challenge. Many of the core systems run on older software packages. To get the recently released software, you will have to do so manually. CentOS is an excellent choice if you need a cPnael for web hosting or running medium-sized businesses.
Even though CentOS has a smaller user base than Ubuntu, it still holds a strong online community and has the provision of premium services options if you so desire.
In terms of the number of packages available, Ubuntu beats CentOS and by far. There are over ten thousand packages available for users in the official repository. CentOS, on the other hand, has only a few thousand tools. Therefore, if you are looking at the number of packages available for the two operating systems, Ubuntu will win.
However, the number of packages does not matter if you are looking for particular packages. Software packages like the cPanel are only available for Red Hat systems like CentOS. Even though Ubuntu has tried to provide alternatives, most of the CentOS tools have dominated the Hosting industry.
7. Ease of use
Among all Linux distributions, Ubuntu is one of the most user-friendly and the easiest to use. That is mainly because the Canonical team behind its development is focused more on usability. With the Ubuntu Server, you have the provision of a GUI that can be installed later and help manage your server efficiently. You can also run other utilities from the Terminal.
Another feature about Ubuntu concerning the ease of use is the large community available. You will find lots of tutorials and solutions to any problems online compared to any other distro.
CentOS also has the provision of control panel tools like the cPanel, which is useful for web hosting services. However, there are still alternatives for Ubuntu available in the market.
In terms of tutorials and guides, CentOS has very few available learning materials online compared to Ubuntu. It might seem even more overwhelming for a new Linux user. However, despite all these, most experienced Linux users go for the CentOS, especially if they are familiar with the Red Hat Linux architecture. Also, most web servers available today run on CentOS.
8. Cloud Deployment
Ubuntu is known for its excellent support for container virtualization. Since June 2019, the Canonical team behind Ubuntu development announced full enterprise support for Kubernetes 1.15 kubeadm deployments, its Charmed Kubernetes, and MicroK8s; the widespread single-node deployment of Kubernetes. That has made Ubuntu Server a more reliable operating system for cloud deployments and expanding its influence in the market.
CentOS is also not left behind in this area. It competes with Ubuntu by providing three private cloud choices and a public cloud platform through AWS. It also offers excellent documentation and a mature platform for users to apply its features further.
9. Gaming Servers
Ubuntu comes with a custom-designed pack for gamers called the Ubuntu GamePack. Ubuntu GamePack doesn’t come installed with games but with PlayOnLinux, Wine, Lutris, and the Steam client. It provides a platform to play games available for Windows, Linux, Console, and Steam.
The Ubuntu GamePack also includes support for Adobe Flash and Oracle Java. It gives users a fantastic experience while gaming online. Ubuntu GamePack is optimized to launch more than six thousand Windows and Linux games. If you have worked with Ubuntu, you can go for the Ubuntu Desktop for gaming.
Unlike Ubuntu, CentOS is not well optimized for gaming services. However, if you want to work with CentOS and still experience the gaming thrill, try Fedora Games Spin. It’s a Fedora-based platform for gaming available for CentOS, RHEL, and Fedora users. Accompanied by an XFCE Desktop environment, Fedora Games Spin comes with over two thousand Linux games.
Comparison Table Summary
|System Core||Based on RedHat||Based on Debian|
|Update Cycle||Less frequent||Often|
|Security||Strong||Good (Requires some additional configuration e.g AppArmor)|
|Support||Solid documentation with a small but active community||Execllent documentation and a big, reliable support cmmunity|
|Virtualization||CloudStack, OpenStack, OpenNebula||OpenStack|
|Package management||YUM||apt, apt-get (for older systems)|
|Hosting Market Share||17.5% of Linux users||38.2% of Linux users|
|Manageability||Challenging (Expert Level)||Moderate (User-friendly)|
|File Structure||They use the same basic file/folder structure but differ in system services location||They use the same basic file/folder structure but differ in system services location|
|Speed Considerations||Excellent but dependent on Hardware||Excellent but dependent on Hardware|
|Ease of Use||Challenging (Expert Level)||Moderate (User-friendly)|
|Platform Focal Point||Geared towards the server market and preferred by larger corporations||Geared more towards the desktop user|
|Default applications||Updates as required||Regularly updated|
Final Thoughts: CentOS vs. Ubuntu
Both of these operating systems are entirely open source and free to use. Depending on your needs and personal preference, you can choose any of the two distributions to manage your server.
If you are a beginner, then I would suggest you go for Ubuntu since its more comfortable to use and has lots of tutorials available. Additionally, the Ubuntu server has proven to be more powerful. If you are running anything on Amazon’s EC2 platform, the Ubuntu server would be a great choice.
If you are a Linux veteran with a good background in Red Hat Linux, go for CentOS. Also, if you are focused on offering web hosting services, then CentOS will be an excellent choice.
However, at the end of the day, your choice will highly depend on personal preference. You can make use of virtualization technology to test both of them before making a choice. Take a look at our article on The 10 Best Linux Server Distros For Home And Businesses.