Whats is better and why? Linux CentoS or Ubuntu?

Posted September 21, 2015 314.5k views
Linux BasicsLinux Commands

I want know what is better, Linux CentoS or Ubuntu?

And explain your answer…

  • Ubuntu is based on the venerable Debian distribution. CentOS is a free clone of Red Hat Enterprise Linux.
    Users who learned Linux on a Debian derivative will be more comfortable with apt-get, and those familiar with Red Hat systems may prefer CentOS, but if you’re new to Linux, the package managers aren’t really a strong differentiating factor.
    CentOS has a longer release cycle; it also has a much longer support cycle. Ubuntu’s Long Term Support releases, which are released every two years, have a support life of 5 years.
    CentOS is the preferred distribution in the hosting industry, so if you want your server to be compatible with the majority of that industry, it’s the safe choice.

  • In short:

    • CentOS is great for businesses and developers that don’t need the newest releases. CentOS is more stable and secure because of that - it always uses stable (but older) versions of their software.
    • Ubuntu uses the latest (non-beta) versions and if you want all the latest features of some app/software, then get Ubuntu. If you’ve used the desktop version of Ubuntu, get an Ubuntu server. It will be easier. Ubuntu has a lot more community support (tutorials, forums etc.), so it’s great for beginners.

    Actually, just recently I did a CentOS vs Ubuntu comparison.

  • Support Centos. Old but not obsolete.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
15 answers

Should be mentioned that CentOs is no longer the “preferred distribution in the hosting industry” and has not been for a long time. That is simply a fake status, CentOS users would like to keep, but the reaility is one very different. Not even in VPS, Dedicated Servers or even Clouds. This also includes Red Hat in those different areas (Simple Hosting, VPS, Dedicated & Clouds). I will leave the following links for anyone to do their own checks but overall, Ubuntu covers well above the “preferred” term for all of this areas. So if you are looking for something that is applied in the industry, on the desktop, in the production stage but also in the development stage. If you are looking for something that is up to speed with latest technologies, openstack, deployment, and more, then please, one quick research for this will reveal Ubuntu above all others. In any case, I will leave the following for others to see and check for themselves.

Sources you can check out are as follow. I will also put the top 5 as of this writing where it applies:

Ubuntu - 34.1%
Debian - 31.4%
CentOS - 20.6%
Red Hat - 3.7%
Gentoo - 2.7%

Ubuntu - 29.9%
CentOS - 24.57%
Debian - 11.31%
Fedora - 0.68%
Red Hat - 0.01%

Ubuntu - 57.5%
Windows - 7.8%
Red Hat - 4.8%
CentOS - 3.7%
Fedora 1.4%

OPENSTACK - (Page 47)
Ubuntu - 55% (With an potential growth of up to 19%)
CentOS - 20% (With an potential growth of up to 7%)
Red Hat - 16% (With an potential growth of up to 4%)
SUSE - 2% (With an potential growth of up to 1%)
Debian - 3% (With an potential growth of up to 0%)

Even sources like Steam prove the amount of users compared to other distros that Ubuntu has, with 30% of all Linux users on Steam, followed by 9% which is a mix of other different distros.

Lastly the Linux Tendency over times shown here, clearly say what will happen in the following years:,%2Fm%2F03x_8t,%2Fm%2F02prjf

  • Most popular don’t means better
    like Honda Civic are more popular than Hummer H2

    CentOS is preferable if you work with big organisation mostly because his life cycle is longer and support profile from OpenSCAP which help to obtain ISO Certification and other normalisations.

    But I’m pretty sure if you take time to configure AppArmor Ubuntu/Debian could also be very secure.

    At the end it depend why you want to learn linux; if it’s for yourself try both and see with which one you feel comfortable.

    If it’s to work in the industries, define which kind of company you want to work with/for and define which one they use.

    Big organisation tend to use CentOS; but I see bank using Debian, so…

  • You are wrong, you are cherry picking data to support your fanboy narrative.

    The hosting community by and far prefers CentOS

    CentOS – 61%
    Ubuntu – 26%
    Debian – 10%
    RedHat – 1,3%

    • Wow Barry, am cherry picking from so many sources? Really?. Just pointing something that is very obvious and open for anybody to check themselves.

      Here is the difference, you posted 4 distros and never provided the source for those percentages you are sharing, while on my original post, I left each source out so anybody could double check themselves and to avoid saying, you know, something like “I am cherry picking”. Anyway, for future reference, since this was posted, here are the new stats compared to the 2016 ones:

      W3TECHS -
      Ubuntu - 38.1% (+4 or 11.7% More)
      Debian - 31.4% (-9.1 or 28.9% Less)
      CentOS - 20.6% (-2.9 or 14% Less)
      Red Hat - 3.7% (-1.4 or 60.8% Less)
      Gentoo - 2.7% (-0.3 or 11.1% Less)

      W3COOK - (Is down, gone, no idea)

      Ubuntu - 33.5% (-23.9)
      Windows - 10.3 (+2.5)
      Red Hat - 2.3 (-2.4)
      CentOS - 3.0% (-0.7)
      Fedora 7.1 (+5.7)

      OPENSTACK - (Could not find the file but I am guessing Ubuntu and CentOS would again be the first 2 in the list)

      Hope this helps and anybody that reads this adds more information to the article based on real world stats from reliable sources and not just dismiss each other by saying stuff like fanboy.

i prefer ubuntu(easy) than RHEL.

i am not blindly supporting. i had my past experience.

we used RHEL 5/6 series.
we are web developers with ROR,postgresql,hadoop,golang(REST-API),angular2-dart,selenium,etc.
we were using puppet(server-agent) , chef(master-node-workstation) to replicate the infrastructure,
we used rvm/rbenv to install ruby VM.
but we have some issues with yum/rpm with RHEL.

for examples if we want to install latest rubies like 2.3.0 , it is little complex in RHEL.
because few c/c++ libraries will give dependencies issues like libyaml-x86-64,libyaml-i386,etc.
similarly we have many issues while updating packages to latest.
installing/uninstalling in RHEL is little headache .
we have more than 40 servers so we have to use puppet/chef.
there are many opensource puppet modules and chef cookbooks for ubuntu than RHEL.

recently we are migrated to ubuntu-14.04, which seems more stable release than the earlier.
it is very easy for us to code install/uninstall instruction for puppet/chef/Dockerfile,etc.
because apt source code repositories contains latest libraries.
apt package manager resolve many dependencies by itself, handling mismatch versions. with apt you can easily uninstall/remove pkgs.

apt repositories has latest source code for many of the open source technologies like ruby,rails,postgresql,golang, selenium,angular2-dart etc

recently we are moving to micro services, kubernetes,docker swarm, where we must have to use containers .we have to write many Dockerfile/s.
ubuntu is very suitable to work with Dockerfile/s docker containers, etc.
here again i prefer ubuntu than RHEL.

  • My vote, for the quality of the answer.

    All in all, i prefer ubuntu myself…
    Most likely for the fact that i got way, way more hours troubleshooting servers/setups and almost find my way ‘blindly’ when facing a new issue - no pretention here.

    I also find ubuntu more intuitive.. Thus, easier for one to make it a ’second nature’ - if i may say so.

I choose FreeBSD, very easy to use, super powerful and secure, great community. Comes zfs, jails. bhyve, PF… it is just superior

  • FreeLSD? Seriosly? But it’s diying.

    • What is dying? If you are saying FreeBSD is dying then I would say you obviously have a very limited IT knowledge.
      All your Mac OS, iphones are FreeBSD, palystation and sony are FreeBSD, nintendo is FreeBSD, netflix runs of freebsd, whatsapp runs on FreeBSD, Islon runs of FreeBSD, most NAS are actually FreeBSD, most routers are either openBSD or FreeBSD. and many others. It is just due to the nature of BSD licence (unlike GPL) you are not required to share your code or mention that you are using FreeBSD.
      If anything, Actually FreeBSD now is booming, Linux is bloated and fragmented like never before. on the other hand FreeBSD provides the fastest, most secure, most consistent, and easiest Operating system now in the market with ZFS, superb port system and tons of brilliant features, LLVM, best community, best licence. And the best of all it is not a one man show and it is not systemd

      • Hi BlueCougar,
        I have to consult you in regards to FreeBSD. May I have your email please ?

      • Right. Not only that, but has anyone tried doing a no-gui install of Windows Server core lately?

        But seriously. FreeBSD should actually be a serious contender for many use cases, particularly where compatibility with 3rd party commercial software isn’t a requirement. I learned the basics of Unix on FreeBSD, well enough that I was able to earn me root on my company’s Solaris servers.

        Although I began my professional career on Windows NT, I’ve been with Red Hat since the beginning. Well, 1995. At work we began transitioning from Solaris to RHEL a few years into the new century. There’s definitely a “Red Hat way” of doing things that, once you’ve learned it, can make managing RHEL systems more efficient. The main value of Red Hat’s training is that it indoctrinates you in their way of doing things. RHEL is every bit as rock solid stable as people say, and most commercial software (yes, even Oracle) will run on it.

        My own deep dive into Ubuntu came in a Docker pilot we did at work this year. I was really impressed with 16.04 LTS server, so much so that I re-paved all my systems at home with it. The server edition of Ubuntu is as stable and reliable as any RHEL systems I have run. It does seem to have a slight edge on RHEL when it comes to package versioning, although lately I have found myself installing some things directly from vendors (for example, Docker). As someone else writes in these comments, it does take some time to absorb the little differences between RHEL and Ubuntu, particularly differences in service and file names, as well as system users and groups. These can be a challenge when trying to forklift from RHEL onto Ubuntu.

        But there’s no more bad advice on Stackoverflow for Ubuntu than there is for RHEL, and the Debian wiki is a pretty reliable source for intermediate to advanced issues on Ubuntu. It’s not the venerable FreeBSD Handbook, but then, what is? As with my RHEL work, the doc and contributed HowTos here on Digital Ocean have been an invaluable resource for me in my journey with Ubuntu.

        • FreeBSD as well the other BSDs mainly openBSD are super stable, secure, clean code. As for freeBSD it is super easy to use. I use it as my main workstation at home and for my personal applications running on VMs, although unfortunately at work we use only RedHat.
          I recommend everyone to give it a go with open mind. It has a great community who are willing to invest their time and effort to help and guide you to learn and solve your problems.
          I must agree it is a bit harder to install FreeBSD than Linux because it gives you the choice to build your machine the way you want. But once you go through the process first time things starts to making more sense and logic and I assure you will enjoy your experience.
          And can build the most the elegant and stable desktops -rock solid- with freeBSD.

I have used both (and am currently using both).

I much prefer Ubuntu, which I’ve been using for less than 6 months. I’ve been using RedHat (and Centos) for over 10 years. It’s only since switching to Ubuntu that I’ve realised just how Centos has been holding us back.

The problem is Centos is designed to be secure and stable, but as a result many things running on it are old versions, with back ported security fixes. If you’ve just spent a million dollars on an in-house software system, you don’t really want it to break a few months later because everything around it is always being upgraded to the latest and greatest. Really this is what Centos is all about.

However, we have always battled with not being able to run certain things on Centos because everything is so out of date. I think the default version of PHP is 5.4 on Centos7 and yet many people are now using PHP 7. It’s perhaps not a problem with an unmanaged service like Digital Ocean where you can upgrade things and take responsibility for it yourself, but if you have a managed service and have to stick with the official Centos Repos then you better get used to working with ancient versions of everything. From memory it also makes it a pain to run things like Magento and Laravel which often require newer versions of things than you’ll have access to on Centos (by default).

For me Ubuntu is a breath of fresh air and I would ditch Centos tomorrow if it weren’t such an upheaval to do so.

  • Thanks for the comment, I was starting to wonder if I was the only one having this challenge.

    I started with RedHat and have been using CentOS for years. I also have a LAMP based solution running on DO and want to move to php7 and a more current mysql variant. I was looking at external repositories to work with CentOS and then noticed that the latest LTS Ubuntu already has this. So, I and either work through through integration and testing of compatibility with external repositories or I can learn a different Linux platform and use what’s already packaged with Ubuntu. There is pain either way… I’m just trying to find the most stable solution with the least amount of pain. Of course this also opens up the MariaDB vs MySQL debate… maybe that’s for another thread.

    • What I can tell you is, for me at least, the differences you’ll need to learn are minimal.

      I need to keep reminding myself Apache configurations are in /etc/apache2 and not /etc/httpd and it’s apachectl -t to test configuration and not httpd -t

      And updating packages is done with apt instead of yum.

      There’s a few things like that but nothing which didn’t take me more than a few minutes to get a handle on.

We have been using both - even currently. We have been in the development space for many years now. Do agree that lot many packages on CentOS are old but definitely very stable and secure.

I would say each of the Linux distros have their own pros and cons. Not only than it also depends on what you are comfortable with. You need to decide between Yum and Apt - or - Selinux and Apparmor.

When developing/publishing PHP based projects, we always prefer to use CentOS. We always use unmanaged services so there is no problem of sticking to older versions of PHP. We use PHP 7.1 / Laravel 5.4 without any problems on CentOS.

On the other hand, when we are working with Ruby based projects, we go for Ubuntu. It is rightly pointed above by thaniyarasu - we do face dependency issues with c/c++ libraries while installing certain newer gems on CentOS.

I use Ubuntu at home for my own servers (about 7 years working with Ubuntu and other Debian based systems) and in work we use CentOS (about 4 years on and off with CentOS).

My go to would be Ubuntu if you want to set something up, play around for it for a while then maybe close it down, without having to worry about getting everything up and running.

Like said before, Ubuntu has more up to date repos, and I for one would prefer that, but if I was setting up a server I know will be used long term (like the ones I set up in work) I would use CentOS without question, its repos are based more on stability and security and if you really want more fancy stuff EPEL is your best friend!

Hey all. Fedora (upstream/development/testing) is working on what they call “Modularity”. If you’re worried about software, you can install a different package manager, such as nix (but this usually requires configuration, and I assume few people care… Ubuntu is definitely the most complex when it requires editing configuration files), but this is what Fedora is doing:

  • A package is up for addition or removal. Every distro has their own package managers. Nothing new.
  • Once a package manager (person) decides to update the package, it goes to koji (the buildsystem) and gets built.
  • Every release has its own repository. RHEL 6/7 and CentOS 6/7 share EPEL 6/7 (“Extra Packages for Enterprise Linux”; shared because CentOS is Red Hat without the branding or paid support, although there are some things going on where CentOS is considered upstream for some development initiatives), and Fedora has 26/27/28 (with Rawhide being the highest-tier development… right now, the release is 27, and 28 just entered ‘branched’, and rawhide is development).
  • Here’s where it gets interesting: Fedora is calling their move to unify the buildsystem and integration of packages (e.g. python-2 and python-3 can exist separately and not break anything) “Modularity”. Fedora is hands-down the best distro for integrating new packages (like Wayland to replace, but the buildsystem places these packages in each repo. Modularity allows implementation across all platforms (Fedora 26/27/28/EPEL).
  • In function, this will all be its own repo. System repos & packages (ex. cent-base) won’t be harmed, and if a user wants to install different Rails stacks, that’s perfectly fine.
  • My personal hope is that this becomes more convenient than tracking these things down on their own. For example, I can get python 3.6 on my CentOS machine through those “extra-community” repos like RPMfusion (free and non-free) and IUS (which is prettymuch up there if I can get 3.6). But I get it seems tedious, and I get some people assume it won’t work because it’s not vertically integrated, Apple-style.

As for my other thoughts on Ubuntu:

  • Desktop has nothing to do with server. Canonical gets too much crap for going their own way with things like Unity and Mir. These are dead projects since Canonical decided they were losing revenue and just couldn’t feed the bear. I also prefer SELinux to AppArmor.
  • Canonical does some really great stuff, though. They’ve made Snappy, which is like Flatpak (they started around the same time, but I know GNOME had stuff going on in '13). Canonical basically runs LXC & LXD, which used to be big because of Docker. It’s not really important for your purposes, I assume, but just know that packaging and packages have little to nothing in this choice. Debian has a tool called “alien” that can convert .deb’s to .rpm and vice versa. But Steam and Spotify are the only programs I know about that are published only as .deb. If you care about servers, it won’t matter, because every major distro is trying to solve the packaging problem. (Containers are amazing!)
  • Ubuntu makes life a pain for development. I like configuration files, but I don’t want to go through everything. Some projects will edit your config files for you, like Let’s Encrypt for nginx on my Cent http server, but you have to be pretty involved already if you want to script.
  • I guess I respect Ubuntu users for their popularization of the linux desktop (and support by software companies, since Steam allowed more gamers to switch - or at least we should acknowledge that SteamOS bases itself on Ubuntu, even though I prefer Steam on Fedora). However, I want to stress that the only differences that matter to servers are how the developers feel with the system. I don’t need extra cruft in my system, and I know my way around CentOS. Neither are hard to learn, I mean a distro is literally the linux kernel plus all the required programs (like the GNU make, autoconf, tar, etc., and the package managers and daemons). CentOS doesn’t default to run things I don’t want, and I’m happy with that. I’m happy with rpm and systemd, and it all just works.

The differences between the two don’t matter. I would never install Ubuntu “because that’s the only way I know how to use Apache”. Remember, everything is open source, and anything that is GPL/MIT/BSD/similarly licensed also includes documentation. First you’ll learn about protocols, then you’ll learn how those are implemented. You’ll learn web servers before you have any opinions about LAMP vs LEMP. You’ll learn HTML, CSS, maybe JS, a long time before you choose to make something with Django. You’ll learn about files and permissions and relationships long before you care about Wordpress vs Drupal (or Joomla).

I challenge you to get straight into it. 2015 was a long time ago. Whoever’s reading this might choose Ubuntu because I seem militant and I seem to adore Cent. Either way, just get one and install something. Say install Docker. They’ll help you out. Everything is there. It’s all documented. Just about every piece of software has installation and “getting started” instructions.

Im a Red Hat Engeneer since 2007 in different versions ive working with Linux since 2001 (to make sure i know what im talking) i like to experiment and i have use everything.

I do not recommend or use Red Hat or Centos for web applications.
For mission crital inside application YES but no for web based applications.

Ubuntu is much stronger for cutting edge technology and much faster for web developing and all those new things.


Everyone has their preferences, I like CentOS but i use Enterprise Linux daily. Ubuntu fits in on some places but i think overall CentOS is more stable and secure. Just my opinion

  • centOS more secure than ubuntu ?

    • Each distro is as secure as the guy configuring it.

      In my experience Enterprise Linux (CentOS) is more secure out of the box. Once you start adding websites, scripts, etc to any distro and you aren’t sure what you are doing that is when the vulnerabilities come in.

      • More experience are more secure, even the best customer proved, enterprise level or whatever better, it’ll mean nothing if admin do not understand what they are doing

  • Fedora/RHEL/CEntOS have SELinux by default. In the case of Ubuntu you need to install AppArmor and you will get a enterprise level security.

Previous 1 2 Next