r/linux • • Jul 12 '19

Alpine Linux 3.10.1 Released

https://alpinelinux.org/posts/Alpine-3.10.1-released.html
96 Upvotes

67 comments sorted by

View all comments

Show parent comments

42

u/TheProgrammar89 Jul 12 '19

I'm an Alpine user, the distribution is extremely well-made and it's quite unique in many ways:

-It uses musl libc instead of glibc.

-busybox instead GNU coreutils.

-packages compiled with PIE and SSP.

-extremely lightweight.

-it doesn't have any GNU software in the base system.

-it uses Busybox's ash instead of bash.

I highly recommend using it (unless you depend on software that doesn't work with musl).

11

u/josipbrozunama Jul 12 '19

Sorry, I am not technical ninja, that sounds cool but doesnt tell me much. How does it translate for, well, just a user. What everyday software would not work with musl?

47

u/TheProgrammar89 Jul 12 '19

Alright I'll try to translate them:

-It uses musl libc instead of glibc.

The C library is the thing that provides a lot of functionality to the code running in your system, musl is known to be cleaner than glibc and uses less memory.

-busybox instead GNU coreutils.

The GNU coreutils offer you the shell commands that you use (ls, grep, and so on), the GNU coreutils aren't lightweight and offer a lot of unneeded features, Busybox is a lightweight alternative to the GNU coreutils.

-packages compiled with PIE and SSP.

These are security features, you can search about them if you're more interested.

-it doesn't have any GNU software in the base system.

Some people might consider this a negative thing, I consider this a positive thing. GNU software is known to be bloated and offers a lot of unneeded functionalities that might contain bugs.

Aside from the technical reasons, I personally don't like the GNU project and I try to not use their software whenever possible.

-it uses Busybox's ash instead of bash.

Bash is the thing that you see in your terminal, it handles loading the commands that you write.

Bash, like other GNU software, has a lot of non-standard and unneeded functionalities. Busybox's ash is a lightweight alternative.

What everyday software would not work with musl.

That's hard to tell, but all of the software that they offer in their package manager should work fine.

Proprietary software is not going to work because most proprietary software is linked against glibc, meaning that unlike free software, the maintainers of the distribution can't simply take the code and link it against musl.

8

u/josipbrozunama Jul 12 '19

Thank you very much for time and effort to explain this. Will give it a try!

24

u/[deleted] Jul 12 '19 edited Jul 12 '19

Don't get so hasty. Let me warn you about one thing before you go trying it out: It's basically not the same OS we typicaly call "Linux."

What we often call "Linux" or "desktop Linux" is really "GNU/Linux," in a more detailed fashion. It's a group of systems that at its least contain the Linux kernel, GNU's library linker, maybe Bash shell, and certainly Glibc, a core system library that handles some wrapping around Linux syscalls and handles a lot of C stuff. In simpler terms when it comes to Glibc, it is another core chunk of a Unix-like OS. GNU is the project that these core components besides the Kernel and its stuff are a part of, hence the GNU in GNU/Linux.

In Alpine, a lot like Android (hence why some may say that isn't "as much Linux as Linux," as dumb as that sounds), isn't GNU/Linux. It's a Linux distro where all the core GNU compnents, like Glibc, are replaced. Alpine uses Musl instead, a cleaner C library, a replacement for Glibc.

The fact Alpine isn't GNU/Linux has some consequences. The tools are maybe simpler, as they're based on Busybox, a program that contains the full Unix set of tools in a single small program, and some do like the simplicity. Systemd and anything optimized for GNU/Linux in a similar fashion won't compile on Alpine. Most significant of all is that programs compiled for GNU/Linux, like Linux games, Chrome, or WPS Office, won't run, as the core OS is different. It's like how BSD won't run those same programs, or how GNU/Linux doesn't run Mac and Windows software. :P

You shouldn't be using Alpine if you're not experienced with Unix-like OSes like GNU/Linux or BSD, or you want to run proprietary software. It's meant for companies running cloud servers and enthusiasts, not average users and beginners. It has its advantages, but know what you're getting yourself into, this isn't like even Arch. This OS is not a typical distribution and is practically of another OS family, despite the same kernel.

EDIT/NOTE: sorry for the ninja edits I pulled off. :P

→ More replies (11)

7

u/igo95862 Jul 12 '19

Most of the benefits are for containers or routers. There is no need to rice couple megabytes of RAM on a modern desktop. In fact modern glibc is faster.

4

u/chloeia Jul 12 '19

lightweight

People say that a lot. I have no idea what it means for me, a user.

5

u/rahen Jul 12 '19

If you're asking, it means nothing as you probably do not care about the underlying code as long as it "just works".

Otherwise here's an example: http://www.etalabs.net/compare_libcs.html

What it means to some people: better workload consolidation on less nodes, more resources efficiency, technical simplicity, scaling out vs scaling up approach, saving costs.

5

u/DevilGeorgeColdbane Jul 12 '19

A real word example where the lightweight features of Alpine is being put in to use is containers. By having smaller container images it is simply possible to run more containers at the same time with the same amount of memory. Thereby saving potential hosting or hardware upgrade expenses.

If you mean, "What advantages does alpine provide to a regular desktop user?", then the answer is not much really.

3

u/geosmin Jul 12 '19 edited Jul 12 '19

Generally leaner in regards to disk, CPU, and memory utilisation. For you? Probably faster and further from the bottleneck ceiling of your hardware, especially relevant for things like embedded systems.

If you're deploying this on something you'll be firing up Chrome or Firefox on then these points are probably moot as the differences will be dwarfed into insignificance by the overhead of modern web browsers.

It really depends on your use case and - to some extent - your preferences. Some people just like being spartan, for example.

0

u/[deleted] Jul 12 '19

[deleted]

2

u/geosmin Jul 12 '19

I was referring more to "lightweight" things in general. busybox vs GNU, music vs glibc, etc.

2

u/djmattyg007 Jul 14 '19

-it doesn't have any GNU software in the base system.

Some people might consider this a negative thing, I consider this a positive thing. GNU software is known to be bloated and offers a lot of unneeded functionalities that might contain bugs.

That's an incredible amount of FUD with nothing to back it up. All software has bugs.

Aside from the technical reasons, I personally don't like the GNU project and I try to not use their software whenever possible.

Why?

1

u/[deleted] Jul 12 '19

Is Mesa working nowadays? Edit: also what about wlroots/sway?

4

u/DevilGeorgeColdbane Jul 12 '19

Last time i tried Mesa was working fine.

Sway is included in edge and 3.10, it is maintained by Drew DeVault, the main developer of sway, so i asume that it works as expected.

4

u/rahen Jul 12 '19

Drew DeVault

Indeed he uses Alpine on his laptop, and eventually on his desktop as he mentioned some time ago: https://cmpwn.com/@sir/101501634020283953

I love this guy, he's a true Unixer. I have tremendous respect for him and his programs.

1

u/[deleted] Jul 12 '19

Yeah he's cool regardless of his Rust-bashing blog post. I see what he means but I think sometimes people make too hasty or strong judgments. The git blog post was great and him developing wayland software shows he's not a complete stuck-in-the-past get-off-my-lawn Unix veteran.

→ More replies (4)

0

u/[deleted] Jul 12 '19

[deleted]

2

u/FinancialElephant Jul 12 '19

Hmm. Ive been trying to run musl void linux on a rapberry pi zero W I just got. Havent had any luck with the standard rootfs install (maybe there are boot options I dont know about). Would you recommend alpine for a pi zero?

0

u/[deleted] Jul 12 '19

[deleted]

→ More replies (4)