r/linuxquestions • • 4d ago

Advice Which distro would you pick to learn Linux for server stuff?

I don't have much experience with Linux yet and I want to learn it more for the server side, not as a desktop. Would you go with Debian, Ubuntu, something RHEL based or does it not really matter in the beginning?

35 Upvotes

59 comments sorted by

28

u/radek432 4d ago

Debian, Ubuntu or RHEL are best options because it's already used on servers.

4

u/ceehred 4d ago

Yes. Also on their apparent share of the various types of server space:

https://commandlinux.com/statistics/most-popular-linux-distributions-market-share/

I see mostly RHEL and Ubuntu Linux servers in my work, SLES comes up mostly for German customers, and the likes of Rocky, etc. only for those who don't normally run Linux (because they are on non-Intel Unix and don't want the hassle of buying into the paid distros just to run a bit of software that is Linux only).

1

u/Aggravating-Piece101 3d ago

pretty much covers 99% of what runs in production tbh.

15

u/AffectionateDust7765 4d ago

If you want to learn, Debian – there are reasons so many other distributions, like Ubuntu or even Raspbian, are derivatives of Debian, and it is also used on an enterprise level, however, although I have seen quite a number of enterprise servers running it, once you have gained a year or two of experience in server operations with Debian (installation, configuration, encryption certificates, maintenance, cron-jobs,…) I would try a Red Hat based distribution, preferably Rocky Linux, since, at least from what I can tell, most enterprise Linux servers are Red Hat based, but for learning, Debian is better, it is cleaner and easier to understand, and a lot of things I saw in Red Hat based systems would have thrown me off had I not had already had experience with Debian.

8

u/BuzzyWasaBee 4d ago

Both Ubuntu Server and RHEL are very common. I would start with Ubuntu, as it is more accessible. Learning the package manager differences is not too bad, but the different MAC layers (AppArmor or SELinux) can take you for a spin if you don't know how to work with them properly. Otherwise, any experience is easily transferable.

6

u/xpedion_ 4d ago

Debian.

9

u/owp4dd1w5a0a Manjaro, Ubuntu, NixOS, Fedora, Guix System 4d ago

Rocky Linux or AlmaLinux. Most servers I’ve encountered in the industry are RHEL, those distros are designed to be as close to RHEL as possible.

My second choice would be Ubuntu. I’ve also encountered this distribution frequently in the industry.

I’ve never encountered Debian in my 20 years of professional software development. I mean, I’ve downloaded it and used it out of curiosity on personal stuff, but I’ve never seen Debian being used for real world industrial/commercial software although I know there’s places using it somewhere.

5

u/AffectionateDust7765 4d ago

Systems engineer here, I have seen Debian a lot while working for/with several companies, but still no comparison to the number of Red Hat + derivatives.

5

u/gordonmessmer Fedora Maintainer 4d ago

If you're looking for something that's "close" to RHEL, and especially if you're looking for a community that understands RHEL well, because you want to learn more about it, CentOS Stream might be the best option.

1

u/owp4dd1w5a0a Manjaro, Ubuntu, NixOS, Fedora, Guix System 4d ago

CentOS is downstream from Fedora and upstream from RHEL. Rocky Linux is what you want if you’re looking for like for like with current RHEL. Alma is what you want if your focus is binary compatibility with RHEL, as far as i understand things.

3

u/gordonmessmer Fedora Maintainer 4d ago

CentOS is downstream from Fedora and upstream from RHEL

That's literally true but mostly meaningless, and in most cases it's actually misleading.

CentOS Stream is a build of RHEL's major-version stable release branch, which I define and illustrate here:

https://gordonmessmer.codeberg.page/dev-blog/2023/07/28/semantic-releases-part-1.html

2

u/kudlitan 4d ago

Most software development targets either Redhat-based or Ubuntu-based distros, especially on the server side. While Ubuntu is "based" on Debian, this is only in terms of sources. Binaries built for Ubuntu will not run in Debian.

3

u/DavidJohnMcCann 4d ago

Don't forget SUSE. The NY Stock Exchange runs Red Hat, the London one SUSE (last time I looked).

2

u/owp4dd1w5a0a Manjaro, Ubuntu, NixOS, Fedora, Guix System 4d ago

I thought about SUSE but left it out because I’ve never seen it in the wild.

1

u/Difficult-Value-3145 4d ago

What about like xcp-ng I've wanted to mess with that for a while I got it up and running at one point then kinda didn't know where to go from there

1

u/Difficult-Value-3145 4d ago

What about like xcp-ng I've wanted to mess with that for a while I got it up and running at one point then kinda didn't know where to go from there

1

u/owp4dd1w5a0a Manjaro, Ubuntu, NixOS, Fedora, Guix System 4d ago

Cool, but I’ve never encountered it in the wild. I’ve seen HP-UX, AIX, and similar stuff, but they aren’t Linux

5

u/Due-Author631 Aurora (Universal Blue) 4d ago

RHEL based, you could get a Developer license to run up to like 20 instances of RHEL, or use a community version like Alma. I'm not a fan of learning on CentOS since it moved upstream, but it would probably work unless you really care about clones.

1

u/AffectionateDust7765 4d ago

I think Rocky Linux is now, what CentOS used to be, so this would be the way to go if you want to be compatible with RHEL.

1

u/Due-Author631 Aurora (Universal Blue) 4d ago

Rocky is anti community.

1

u/AffectionateDust7765 4d ago

I'll take your word for it. Last time I had to seriously work with a Red Hat based system was when CentOS was still a thing, so it's been a while.

1

u/gordonmessmer Fedora Maintainer 4d ago

CentOS is still a thing today. Stream is more secure, more open, and more community focused than the old model was.

2

u/moritz12d Manjaro 4d ago

My first distro that ever worked was SuSE Linux. So besides RHEL and Oracle there is SLES which is almost like Leap. Maybe RHEL is better polished therefore Leap is better for learning. Another pick would be Debian as one of the oldest distributions at all.

2

u/stormdelta Gentoo 4d ago

I've had pretty good luck running OpenSUSE Leap for my home server stuff (mostly running on a cheap minipc).

We use Debian or distroless container images at work primarily, we don't touch bare servers hardly at all for our side of things.

4

u/poedy78 4d ago

Debian.
- Stable as fack
- min. install is really barebones, so you learn a lot
- pretty well documented on the inet

3

u/Merthod 4d ago

Debian if it's home, something Red Hat-like if it was corporate.

2

u/rarsamx 4d ago

Yes, Debian. Ubuntu server or a redhat derivative like alma or rocky.

If you care about server side services, usually Ubuntu.

If you care about server side infrastructure, redhat.

If you want it for personal use. Debian.

1

u/sn4tz 4d ago

As people said: Debian, Ubuntu and RHEL are the most commonly used. Sometimes you see OpenSuse in there.

If you want a deeper understanding of the underlying components of a server and how to configure it, i would recommend Arch or NixOS, since you have to build the server yourself basically.
(There are maybe/probably better alternatives to this but that‘s just my knowledge)

1

u/UncleDevil 4d ago

Ubuntu Server or RHEL (either Rocky or Alma are good, here) if you want to learn for professional reasons.

If it's for personal use? I'd just go with Debian Standard

1

u/BranchLatter4294 4d ago

Ubuntu and RHEL are the most popular for servers.

1

u/Jwhodis 4d ago

I just use Debian with the DEs (KDE Plasma, GNOME, etc) disabled.

I use Coolify to manage everything through a web panel.

1

u/Unfair_Secretary_860 4d ago

for enterprises, RHEL og Ubuntu. For risk takers with no vendor risk assessments; Debian. Clean and effective. always open source and no fee is needed. Or if you love infrastructure as code you could go with NixOS.

1

u/Caddy666 4d ago

i wouldnt pick a distro, in the way that you think.

i'd think more along the lines of whats running on those things, first.

ultimately, some of the filepaths change, but for the most part, theres actually not much in it once you know whats going on.

1

u/MeatballSemiotics 4d ago edited 4d ago

Most Linux distributions serve just fine and the lion's share of knowledge is transferable between distributions.

If you have any aspirations of doing server stuff in industry, yes, stay with RHEL. There is a focus on supportability in the enterprise; I can't say either way whether RHEL is actually better suited than other distributions as a server but because they have a robust support system behind it (and now, IBM), in my three decades working in IT, I can say there is a very strong prejudice toward RHEL in the enterprise. For production work I have seen it used exclusively, ever since Solaris started dying away.

For personal use it doesn't matter, although I think few will indicate that the RHEL-related distros (or Fedora) are non-suited for this purpose.

I use Debian for all my personal stuff. Debian's community metaphysics can make it squirrely for enterprise use and I have seen it used deep within corporate networks for testing and low-risk, non-production things. Everything which touches the Internet has been RHEL. My experience is subjective, obviously, but I strongly suspect this trend is common.

I love Debian and probably won't stop using it for all of my personal stuff.

1

u/charchuck 4d ago

I lean towards Debian just because it's what I run on my server and it's simple, stable and widely used across "the industry". I've never actually run Ubuntu Server, but I did have Ubuntu on my machine that I made "headless" by turning off the GUI by default. The upgrade from 24.04 to 26.04 was awful and after hours troubleshooting I eventually nuked it and installed plain Debian for running my Podman containers - FreshRSS, Readeck, Navidrome, Jellyfin, Silo (testing as a Jellyfin replacement), and a bunch of other small things.

I don't know a lot about Rocky Linux, but I've run Alma in WSL and in VMs and it seemed fine. I'd probably lean more towards Alma if you want something RHEL-ish, though Rocky aims to be more compatible with RHEL from what I've heard.

I've never run an openSUSE server before, so can't/won't comment on Leap and its greatness.

I guess in order I'd pick Debian, Ubuntu Server, Alma, Rocky, then openSUSE. If you're just looking to learn I would think any of them would be fine with the caveat that it depends on what you really want to learn, do, and if you're targeting a career or specific industry.

1

u/marsd 4d ago

Go straight with base Debian or Almalinux

1

u/levelZeroWizard 4d ago edited 4d ago

Here’s a list of projects you can do to kinda “speed yourself up” and get a general feel of the “server” stuff. Obv change it up if something else seems fun
- learn the bash terminal; do the bandit ctf course on overthewire.
- Setup a vm with Debian with no desktop environment; CLI only.
- Learn to make a systemd service to run a basic web server.
- learn docker compose
- host a website using docker compose on your Debian vm, bonus points for rootless docker.
- do it all again on a promox server

EDIT: oh yeah and no copy and pasting code. Stack overflow inspiration at most!

1

u/supradave 4d ago

A Linux distribution can be both a desktop and server in that any desktop or server software can be installed. If you're early in your career, it shouldn't matter except to get experience with whatever you think a server does.

Granted, tweaking settings for server-side stuff is a whole 'nother issue.

But Debian-based or Fedora could at least get you started. Learn them both. There are differences in /etc that are specific to either. RedHat usually has selinux turned on, so you might have to learn the basics there.

1

u/anto77_butt_kinkier 16.04 was peak 4d ago

Debian would be the best one to start learning on because there are a lot of distros for important services that have Debian as a base. Debian is the most common distro for servers aside from RHEL distros.

You COULD also start with fedora or centOS stream, since thel is based off of them, but personally I would recommend starting learning on Debian, then jumping to RHEL.

Sysadmin skills learned on Debian can translate easily into ubuntu server skills, as well as other Debian based distros. And once you're competent enough with Debian, and you grasp not just how to use the commands but also how the commands work, you can jump pretty easily to RHEL, and continue your learning on that.

1

u/Open-Adhesiveness-86 4d ago

Start with Debian since the minimal install gives you nothing and you have to wire it up yourself, but spin up one Rocky VM early just to get bitten by SELinux. Move a docroot to /srv/www and nginx 403s with nothing useful in the error log until you do semanage fcontext -a -t httpd_sys_content_t "/srv/www(/.*)?" then restorecon -Rv /srv/www. That lesson doesn't transfer from apt.

1

u/Unlikely-Sympathy626 3d ago

Debian, sles or rhel.

1

u/iluvatar 3d ago

I'd pick RHEL. It's probably the most complete of the Linux server options.

1

u/sebastien111 3d ago

Debían o RHEL sin lugar a dudas lo mejor para servidores

1

u/Itsme-RdM 3d ago

RHEL or SUSE, both have excellent documentation and experience in business environment

1

u/73nda 3d ago

Server stuff hmm ill put all my opinions aside and say ubuntu.   Ubuntu is what linux certs use.  You can use anyto learn vi, docker, kernels, bash etc.  I would stick with ubuntu first and then rhel for cloud stuff.  Maybe also do linuxfromscratch so that gives you what poking around in archbtw might do.

1

u/LeckerBockwurst 3d ago

OpenSuse Microserver. If you need a Gui, check OpenSuse Kalpa (which is basically OpenSuse Microserver with KDE).

1

u/Kitoshy 3d ago

Arch.

Imho perfect balance between a DIY distribution and ease to install and maintain, i.e. perfect balance between having a system customized to your use case and not having to do all with a high level of expertise.

Yes, learning curve will be higher than with other distributions, but it's still possible to learn it without a headache. Documentation will hold your hand during the process if you put your patience on it.

If you definitely don't want to start with a DIY choice for whatever reason, Fedora and Ubuntu could do the work too.

1

u/SDG_Den 3d ago

depends on whether you want to learn it for yourself or for a job/study.

if you're looking to learn linux server for business use, start with either Rocky Linux or ubuntu server. rocky linux is effectively a RHEL clone, while ubuntu server is just generally used a lot.

if you want to learn for yourself, imo, nixOS is a better choice, in part also because it has a bit of infrastructure that you can set up for yourself as a starter, and because it means you're not busy learning things like command syntax and can focus on *just* learning how things work. this is especially a good choice if you're also planning on hosting things that aren't in nixpkgs yet, since it means you have to not just figure out how they work and how to set them up, you have to also create a reproducible build and module for it, meaning that it has to be repeatable and you can reference your work at any later point. in a sense it's self-documenting assuming you keep your configurations in git.

imo, nixOs is also just a much better server candidate than imperative distributions, sadly most companies still use imperative distributions instead of something like nixOS, and then try to make them declarative and reproducible afterwards through something like ansible.

in the end, what matters most is not really the distribution, but instead, having actual goals for what you want to build, and ensuring that whatever you learn sticks in your memory, so plan out projects where you have to use the same methods multiple times for different things. EG, make sure you consistently get to interact with things like systemd services, PAM, grub/systemd-boot, databases, firewalls etc.

this can be done pretty easily by setting up a home-lab, but honestly, even better would be to set up a home-lab but treat it as if it is critical infrastructure for a business, that means high security standards, failover and general resiliency.

1

u/SkujuZiepes 19h ago

I'm running home server for over 10 years. Mostly my own web apps. I do not bother with any specific server distro. I installed Ubuntu desktop minimal and then added services on top. There is no need to deep dive into terminal if you're just starting, even after you're comfortable with terminal commands, a graphic UI gives you option to add remote desktop on top of it, which you would have to install anyway if you ever wanted to run something like Kodi on it. My 2cents - start with any mainstream distro you like, install light desktop and go from there. It will surely boot without monitor or keyboard attached 😂

1

u/BeardedBaldMan Bluefin 4d ago

We picked Ubuntu for our servers just because of how common it is and the slightly wider supply of documentation

-4

u/BlackheartBeagle 4d ago

Slackware Linux or - even better - NetBSD.

2

u/AffectionateDust7765 4d ago

I disagree. NetBSD, being an … actual Unix? … may still be the better choice for special cases, but for all that it is worth, the penguin has eaten Unix' lunch. Including appetiser, dessert, the plate, fork, spoon, knife and dinner table 😉 And with all due respect to Slackware, personally, I have never seen it on a production server out in the wild, only derivatives of Debian (like Ubuntu), Debian itself, and mostly Red Hat Enterprise Linux and its derivatives.

0

u/BlackheartBeagle 4d ago

Debian is great if you want to actually run services in production. To LEARN about services - i.e. how a webserver works, how a mail server is configured and working, ... - it is much better to choose a system which uses the original upstream sources. Not one which splits them into several packages and does some woodoo to generate configuration files.

2

u/AffectionateDust7765 4d ago

Interesting, my own experiences (I run/ran webservers and mailservers on Debian) are different, I found Debian pretty straightforward in its approach, no “voodoo” of any kind. The problem you describe I had with SuSE back then … but then, I think my experiences here are a bit outdated, because the last time I used SuSE was in the some 25 years ago and for private use and in part professional use I have used Debian ever since and have never looked back.

-5

u/alanwazoo 4d ago

FreeBSD for server r/FreeBSD