DEV Community

Cover image for Which is the best Linux server distro?
Madza
Madza

Posted on

Which is the best Linux server distro?

Linux is known as one of the leading server operating systems which is more prevalent and wide-ranging. By the research I've done Debian, Ubuntu, CentOS, Fedora and Red Hat came up often.

Which has been your favorite Linux server distro and why?

Discussion (80)

Collapse
lietux profile image
Janne "Lietu" Enberg

The ecosystem in RedHat based distros is designed for servers. It's easy to automate things, and you don't have to spend excessive effort trying to disable expectations for user interaction.

Anything Debian based is unreliable. APT was not meant to be used without user interaction, and trying to do that requires constant use of poorly documented hacks.

RedHat based distributions also typically come with SELinux enabled unlike Debian based distributions. I don't understand why you would want to run a server with common security features disabled.

In the end it all depends on what you want out of servers. Nowadays running Alpine Linux based Docker images is often much more productive than managing servers as that's just inventing additional work for you that is critical for security yet typically not in anyone's focus.

If you run your own server, you need to maintain security updates, check up on permissions, logs, hardware, and so on. If you don't you can focus on building the things you need instead of all that, reducing cost, liability, cognitive load, and so on while providing more time for the things that matter.

Collapse
hyperpress profile image
John Teague

I own a hosting company, and we've run Ubuntu servers for nearly eight years without a single distro based incident Google still runs a custom version of debian, and ran them for years as both desktops and servers. There's nothing wrong with using rhel, but there tradeoffs with every server OS. You really have gotten bad information. I'd urge you to learn more before commenting.

Collapse
lietux profile image
Janne "Lietu" Enberg

Comparing anyone to Google is just ignorant. Google has some 100k employees with a quick look at Wikipedia. What they are able to do is quite different from what almost anyone on the planet is able to do.

Google running a "custom version of debian" could easily mean they're manually packaged every single thing themselves to make everything work unattended. Do you seriously expect every small company out there to be able to put the same effort into managing their servers as Google?

Thread Thread
anonymouscoward profile image
Anonymous-Coward

May be so, but still, thousands of smaller companies have no problem running Debian based infrastructure. Those don't have that many employees. IME, Ubuntu server, which is Debian based, is extremely convenient to run as a server, more so than anything RH-based. It's package ecosystem is still somewhat larger than RH's, and in 10 years since I started using it as a server I didn't have a single problem with package dependencies, despite using tons of PPAs. There's no PPA equivalent in the RH world, and whenever I needed to get my hands into anything RH or Fedora, I sooner or later ran into package dependencies trouble.

Another argument for Debian-based servers: there is a chart somewhere with what distro is based on what other distro. More than half of all distros out there are Debian-based. RH-based ones barely account for a quarter. That means you're twice more likely to get distro-/package-related support, if you need it, if you run something Debian-based rather than RH-based.

As for Google, I can tell you first hand that while they do inspect and get every single package they allow on their machines, they don't repackage them. They just built a ton of stuff on top of Debian. Really, a huge lot. Choosing Debian must have had at least something to do with how easy it is to customize and script Debian-based systems.

Thread Thread
lietux profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Janne "Lietu" Enberg

Another argument for Debian-based servers: ... More than half of all distros out there are Debian-based. RH-based ones barely account for a quarter.

Your logical fallacy is: Bandwagon. yourlogicalfallacyis.com/bandwagon

The rest is anecdotal: yourlogicalfallacyis.com/anecdotal

Thread Thread
anonymouscoward profile image
Anonymous-Coward

I meant half of all distros being Debian based and only a quarter being RH based as a statistical argument. It's highly unlikely that many more distributions use debian as a base even if Debian is a less stable or otherwise worse base distro than redhat. Possible, but unlikely. It's more likely that there's something (or some more things) that Debian does differently that makes it easier or more convenient in a different way to build and customize distros based on Debian. Since most often when, as a company, you use a Linux distro for your servers, you customize it, and maintain those customizations, that would be a significant advantage for Debian.

Personal experience is always anecdotal. Yours included. Statistics, on the other hand, is based on data, not anecdotes. Debian-based systems have a much larger installed base than RH (server-side), which implicitly means a larger community and a wider area of applications and more varied setups in which Debian-based systems run. This, in turn, means better community support. That's not something to be discarded for a server OS.

RH, as a server OS, has the upper hand when you actually need all the enterprise-specific features that RH adds on top of what's freely available as open source, such as infrastructure management or high availability, plus the paid support. If you don't, RH doesn't have anything on other distros, except a smaller package library than Debian-based systems.

Collapse
bigpod98 profile image
Primož Ajdišek

Also SELinux is not the only common security on the market There are things like apparmor used by debain ubuntu opensuse and more as fat as i understand SELinux is only used by default in distributions based on RHEL, having used fedora server centos server ubuntu server debian server even arch as a server i can tell you right now that in reality its all about preference and what you are used to

Collapse
adamoutler profile image
Adam Outler • Edited

Apt works fine without interaction. Debian is extremely reliable. You have obviously never used a server distro other than RHEL. RHEL is great for enterprise and the legalities that go with it. Mainly it's great for the legalities. There is nothing stopping you from changing RHEL with Ubuntu Server except you lose the service contract which is required by enterprises. Sure you can get one from ubuntu and manage your servers from a web interface with them, but the RHEL brand commands more respect in the server world because they were first.

Collapse
lietux profile image
Janne "Lietu" Enberg • Edited

I've been using Linux extensively since the 90s, thanks, but I have enough experience with Debian based distros and other distros to have a pretty good idea of what to expect from them. I've likely personally used more different distributions than you could name.

I've never had a distro that was not Debian based try and delete all instances of my kernel, or fill up my boot partition so it could not install any updates, or get the package manager to an unrecovable state where it's constantly trying to delete a massive number of the packages installed.

I have no interest in RHEL, and I have never used RHEL on anything I cared about.

RedHad based distros (such as CentOS) tend to have working package managers, which are designed for server use by serious professionals. Anyone who has tried even once to automate installing software on CentOS vs Ubuntu knows how much you need to hack around to get dpkg based installations to go through unattended, and that you never have to hack anything to get rpm based installations to go through unattended.

Thread Thread
madza profile image
Madza Author

Learned a lot from your insights, awesome to hear from experienced devs 😉 Thanks! 👍

Thread Thread
adamoutler profile image
Adam Outler

That's interesting Janne, however, it seems you're straw-manning Debian. I too have been using Linux since the early 90's, have several certs, and created the first distro to run within a chroot in Android OS. I've never experienced Debian deleting all instances of kernels. That's not something that is a common problem and most instances I see online are where people deleted their own kernels.

I believe you need to learn how to use the Package Managers better. There are several commands which can be used to reset debian and other package managers. They go into a state where they won't perform operations because it's dangerous to do so, but you can always look at the packages that are being installed and remove them. For example "apt update --fix-missing" or "apt remove -f <package name requested here". In the worst case scenarios, once you have removed the offending package and caused a bunch of damage to your system, you can "apt install --reinstall ubuntu-server^" that "^" causes ubuntu-server package and all dependencies to be reinstalled.

The most common cause of problems with package managers is broken packages and fixing them is different on each system. For CentOS/RHEL, you might have to install a different package list or get into the rpm command itself.

Point is, there is no best distro. They all have their problems, but none of which are problems which you mentioned. Debian does not delete your kernel unless you command it to and you can't get Debian package manger into an unrecoverable state, you just need to learn to Linux better. You can start with automating packages on Debian with "apt install -y " or you can get an update manager.

Collapse
gcgbarbosa profile image
George C. G. Barbosa

That is great info. Thanks!

Collapse
madza profile image
Madza Author

Thanks for the extended insight! Learned a bit! 👍

Collapse
z00md profile image
z00md • Edited

I think a better question could be - Which is your favorite linux distro? "Best" is highly subjective.

Nevertheless, I have tried many just for fun. I have to use windows because of the games though, but I do like the performance linux give on the same hardware. For me Ubuntu and Mint would be the better choice as they are supported on most of the consumer hardware and a big community. Mint also has the third party closed source drivers options to install in case you need.

I can remember that 10 years back it was the Puppy linux that I used to boot in and rescue whenever I messed up my installations or bootloader.

Edit:
I miss-read the question even reading it multiple times:-D. Sometimes you are just out of your mind. The discussion is about servers and not PCs. Thanks @psvl for reminding.

Collapse
asytnik profile image
asytnik

Did you read the topic of discussion?

Collapse
z00md profile image
z00md

By topic u mean the post text? Yes.

Thread Thread
psvpl profile image
Piotr Szeptynski

Then tell us about your servers running Mint or Puppy, please.

Thread Thread
z00md profile image
z00md

Haha. Gotcha. My bad. Actually whenever I hear distro, it rings a bell for me as pc. Even reading the post 5 times😁.

Collapse
furycd001 profile image
Jonny Sherwood-Bowes

Personally I like running Debian whenever it comes to servers. I usually just install everything and then never really touch it after that. For the most part it just works and never gives me any reason to touch it....

Collapse
fultonbrowne profile image
Fulton Browne • Edited

Ubuntu server, FreeBsd, or OpenBsd. Openbsd has the least support but is by far the fastest and most secure. FreeBsd is pretty secure, generally faster then Ubuntu, and has a lot more support then OpenBsd. Ubuntu server will run freaking anything.

Collapse
anonymouscoward profile image
Anonymous-Coward

Absolutely anything BSD, for highly specialized systems where the risk of having to run something unsupported is low. But with traditional servers that's most often not the case. Which is why I'd say Ubuntu server as a first choice.

Collapse
gtmarewo profile image
Gerald Marewo

Bad is not linux

Collapse
fultonbrowne profile image
Fulton Browne

It is unix, just as reliable, and free software. In most server recorces it is considered a distro.

Thread Thread
gtmarewo profile image
Gerald Marewo

It is unix but it is not a linux distribution, is it?

Thread Thread
fultonbrowne profile image
Fulton Browne

No its not. But I thought its should be mentioned. Here is a look of some of the differences educba.com/linux-vs-freebsd/

Collapse
adamoutler profile image
Adam Outler

For a personal setup; Ubuntu Server is an awesome minimal distribution. They have everything you need and a huge community backing the distro. If you intend on maintaining it yourself without support, Ubuntu is the way to go.

Also, worst case scenario, where you get lost in the terminal and need a GUI (not me, I'm too manly for GUI), you can convert your server into a desktop with "apt install ubuntu-desktop^" or vice versa with "apt install ubuntu-server;apt remove ubuntu-desktop;apt autoremove"

For a Business setup; Red Hat. RHEL was first to business and they've been dealing with enterprise level issues for a long time now. They have excellent support, understand business needs, and if you need it and if everything fails, you can point the finger at them.

Collapse
johnjamesmarsh profile image
johnjamesmarsh

I've always gone with Centos/Redhat but I finding their decision to move away from Docker quite challenging. Redhat bundle Podman in Centos/RHEL 8 as a container engine but it is not supported fully by Kubernetes so you end up fudging something. I'm now trying Ubuntu server and finding their Multipass installation a quick and easy method to build infrastructure. Will have to wait before commenting on its value as a Centos/RHEL replacement though

Collapse
jcsh profile image
Justin Ho

Yea I also had issues using podman when I first spun some containers up but it does say alot about dockers overly permissive use of the underlying system.

I actually still root for podman just because docker hasn't found stable funding for further development compared to red hat + ibm. Plus with other orchestrators like Nomad getting better it'd be interesting to see where container orchestration goes in a few years.

Collapse
scroung720 profile image
scroung720 • Edited

I have used Fedora, Ubuntu and CentOS. I really liked CentOS but I have some projects where making work some dependencies was painful and in Ubuntu it was automatic. So, I end up using Ubuntu always because it has better support for the things that I use. And Fedora I had bad experiences 7 years ago every time I updated the system it was throwing errors and things stopped working.

Collapse
gsarig profile image
Giorgos Sarigiannidis • Edited

Back when I was on Hetzner I used Centos and I was perfectly happy with it, as it was rock-solid. When I moved to DigitalOcean, though, I decided to switch to Ubuntu, not necessarily because I thought it better but because it was easier to find documentation and support online. Also, being so popular resulted in being the first or among the first to be supported by new tools and services. Of course, I am happy with it too, as it works fine with no issues.

Collapse
anonymouscoward profile image
Anonymous-Coward

You make my point better than I do. RH-based systems are great if they're static and you don't ask too much of them. When you start to constantly update them, add and remove software from various sources, they are no longer that great. The stable server that rarely changes was feasible 10 or 20 years ago. Nowadays, if I absolutely must run a traditinal local server (which hasn't happened, over the last maybe 5 years or more), I'd prefer one which doesn't need a complete reinstall after every second major update, or whenever I have installed and removed too many third party packages.

Collapse
ganesh710 profile image
Ganesh Ravindran

Ubuntu for sure

Collapse
princebett profile image
Prince Bett

I find the comments very insightful. I don't have much experience with servers. Does anyone have reasons not to use arch ? I'm thinking of setting up a personal email server and hosting a static site. I'm very comfortable with the distro.

Collapse
lietux profile image
Janne "Lietu" Enberg

Seems to me that Arch Linux is a distribution targeting people with infinite time in their hands. They have pretty good documentation on how things work, but they also don't think about anyone's real world needs. Every time I've done anything with Arch it's taken too much effort to get anything running.

Collapse
princebett profile image
Prince Bett

It gets some getting used to. I run it as my desktop and I get things running within 5 minutes. Is there a technical reason I shouldn't use it for servers ?

Collapse
wolfangaukang profile image
p. • Edited

I think some people on the comments are ignoring the word server. Anyway, I have been working recently with NixOS and it looks like a great option for setting up a server distro, as you can simply set up a configuration file and the OS will load it and download what is needed. So you just set up what you need (users, programs) and not enable Xserver and it will just load what is necessary.

But as a stable option, I would go CentOS (RHEL if there are conditions).

Collapse
robinrs profile image
Robin

Old but Gold: Debian.

Collapse
bigpod98 profile image
Primož Ajdišek

My favorite server distro gotta be ubuntu, there are few reasons unlike centos it changes enought quickly that you can be fairly certien newer changes will be applied whether that is kernel or software(underlying os should be fairly fluid and updated whenever possible in my opinion which goes against what most server admins say but i have my own opinion) which brings performance improvments and security. But reality is nowdays OS is just a piece of that story containers are a thing with docker at forefront, where i will use ubuntu as well but depending on your application you could use your own rootfs image, alpine or any other rootfs image and it comes down to preference and subjsctivity

Collapse
jcsh profile image
Justin Ho

Centos / rhel because of their support for open source. Running upstream fedora as desktop distro.

Collapse
gcgbarbosa profile image
George C. G. Barbosa

I also like to work with CentOS. Very reliable.

Collapse
jonprocter profile image
jonprocter

For web hosting CloudLinux (usually installed on top of CentOS if images aren't available) is my preferred option because of CageFS.

Collapse
ninjawk profile image
ninjawk

Server: RHEL or CentOS
Desktop: Manjaro

I used to really like Debian, but once I learned about how other distros manage their package management, I realized that APT really sucked donkey balls. But Ubuntu's support group is huge, and their problems and bugs are usually fixed immediately.

Collapse
thebtm profile image
Brad

I would look at what is being asked from the server. If your going to run unifi software, Ubuntu/Debian. If your going to run a Desktop for gaming, Ubuntu. If your running a gitlab server RHEL/CentOS. And for security testing, Kali.

My first choice is RHEL/CensOS but if the task I'm looking to do doesn't run as smoothly or at all, then I'll pick the best Linux for the job.

Collapse
adriangrigore profile image
Adrian Emil Grigore

My favorites are Void Linux and OpenBSD.

Collapse
gtmarewo profile image
Gerald Marewo

Is openbsd a Linux distribution?

Collapse
adriangrigore profile image
Adrian Emil Grigore

Ha, no! I just thought to add it as I also use it on servers. But no, strictly speaking Void Linux is my favorite (best for me) Linux distro.

Thread Thread
gtmarewo profile image
Gerald Marewo

Noted. Thanks.

Collapse
strickolas profile image
Nicholas Saccente

I'm biased because we run Fedora in my house, but APT feels very unpredictable at times. I had Nagios set up on Centos 8 at work, and when I had to migrate it to Ubuntu 20, nothing worked!

I know it's a matter of opinion, but my servers run Centos 7 or RHEL, purely because of stability.

Collapse
0916dhkim profile image
Donghyeon Kim

I second this. Stability & reliability are all I ask for servers. Also, I rarely do package update or package removal on my servers (I just spawn another server with updated dependencies), so I don't need too many package manager features. yum & dnf are not the most feature-rich or user-friendly package managers out there, but they surely get their jobs done.

Collapse
rvxlab profile image
RVxLab

I tend to go with Debian because it's relatively light and widely supported. But I generally put everything in Docker containers so I'm pretty sure that it doesn't matter in the end.

If it works, it works.

Collapse
Sloan, the sloth mascot
Comment deleted
Collapse
gtmarewo profile image
Gerald Marewo

That's not a Linux distribution

Collapse
xcession profile image
Пэйнт

Arch Linux (and other Arch based distro), because of the AUR.

Collapse
judikaelb profile image
Jud3v

For me debian is the best.

Collapse
adnanbabakan profile image
Adnan Babakan (he/him)

I used to use CentOS but recently switched to Ubuntu Server. I feel like home with Ubuntu :)

Collapse
boris profile image
Boris Quiroz

Ubuntu (see livepatch)

Collapse
ucavalcante profile image
Ulisses Cavalcante

I like to use Debian they have a great support and stability.

Collapse
dzya profile image
dzya

Ubuntu for desktop, and CentOS for server

Collapse
vishalraj82 profile image
Vishal Raj

@mazda , Quora would be the right place to ask questions. This is blogging platform.

Collapse
madza profile image
Madza Author • Edited

I see your point. Tho, I always thought the discussion format is the best way to learn. The creators of DEV has dedicated a unique #discuss tag for that reason here on DEV too, with 10K+ posts already. The discuss tag is moderated by 5 people, if they will find the content to be inappropriate, they will change the tags or remove the post. 👮‍♂️
Quora is more oriented to general public and people in dev specific pages are often less competent and many do comment first Google result just to get points without personal experience in the field. DEV community is specifically oriented to devs and engineers, thus the discussions add way more value compared to Quora. 😉
I always try to give my knowledge on the top of discussion topics, so others can get some info from the initial post too. Furthermore, browsing through comments there are lots of valuable sources on new tools, tips and suggestions, as many users have noted that they have learned a lot from my discussions. I see it as a two way communication and it's awesome to exchange the knowledge, meaning it's a win-win for all of us participating ❤💯

Collapse
vishalraj82 profile image
Vishal Raj

Ah, that is so cool. Wasn't aware of it. Thanks for enlighting me.
But I would still hold on to my statement, Quora is much better for Q&A

Collapse
zilti profile image
Daniel Ziltener

It isn't Linux, but my choice would be FreeBSD. If it has to be Linux, then OpenSUSE Leap (or, for companies, SUSE Linux Enterprise Server).

Collapse
perigk profile image
Periklis Gkolias

Even though I like the debian family, most serious IT engineers I know prefer CentOS.

Collapse
adamoutler profile image
Adam Outler

It's the free version of RHEL they use at work, most likely.

Collapse
perigk profile image
Periklis Gkolias • Edited

Not aware of that detail. RHEL and CentOS indeed share the same things technically

Collapse
jlauro profile image
John Lauro

Depends on the use.
In general I prefer Redhat EL or Centos EL, which have 10 year support, that said because of the long support cycle the supported packages can be a bit dated between main releases. You can setup a server and besides for largely unbreaking patching it just works for many years.
Ubuntu is a bit more quirky, but has broad and fast support for newer software. That said, it will require to upgrade more often compared to Redhat/Centos, forced to do more portenialy breaking updates, but in general easier to upgrade over major version (which is good as you have to do it more often).
Recently for my home server I have been using PCLinuxOS. Not as popular or wide of support as Centos or Ubuntu, but it is light weight and major plus it is systemd free. So far, it has worked well as a base server.

Collapse
d_exception_ profile image
D-eXception

Ubuntu for sure with production apps running inside docker. Best of everything.

Collapse
demyxco profile image
Demyx • Edited

Alpine Linux because it’s a lightweight OS for Docker host and containers.

Collapse
anonymouscoward profile image
Anonymous-Coward

True that, but I wouldn't call Alpine a server distro. It's a dedicated container distro. If you start with Alpine, you have to do a lot of tedious manual package installation and configuration to get to a decent standalone server setup.

Collapse
fayaz profile image
Fayaz Ahmed

Have used Ubuntu for year, really want to use elementary.io/

Collapse
rakeshandrotula profile image
Rakesh Androtula

Used to use UBUNTU. Now, shifted to Pop OS!!

Collapse
sanjaygswmi profile image
sanjaygswmi

My favourite is XAMPP server. Lol😂

Collapse
aguedeney profile image
Alan Guedeney

Ubuntu 20 for desktop workstation, CentOS for Server, and Alpine Linux with Docker.

Collapse
ledlamp profile image
Lamp

CentOS/Red Hat because new home directories are mode 700 by default.

Collapse
khflab profile image
Kayo Hamid

I use CentOS.

Collapse
antoniofalcao profile image
Antonio Falcão Jr.

FEDORA

Collapse
davychhouk profile image
Davy CHHOUK

Pop!_OS ??

Collapse
huyduy profile image
Huy Duy

It depends on your needs.

Here is a recently Reddit post post about Linux distros.