Live data from Hacker News

Ask HN: What did Linux not do right?

news.ycombinator.com

41–50 of 173 posts

Re: Ask HN: What did Linux not do right?

#41

Earlier quoted context omitted.

A proprietary driver that works is better than an open-source one that doesn’t work or doesn’t even exist.

Sure, but like 5 open source drivers is better than one proprietary driver that works, so that math gets complicated pretty fast. For a while you could actually use windows USB wifi drivers (Ndiswrapper) under linux, but it turned out to be unnecessary eventually.

It's ironic that the Windows system of stable ABI is the reason NDISWrapper was feasible in the first place.

Re: Ask HN: What did Linux not do right?

#42

Earlier quoted context omitted.

people that are militantly anti-systemd confuse me greatly. the different and inconsistent init systems that preceded it were a nightmare. it led to a whole ecosystem of secondary system to manage apps, god, runit, monit, supervisord, etc. now i can just write a simple configuration file and have my app managed. i can describe network filesystem mounts as dependencies. blah blah. systemd made all of this trivial.

Before if you knew the standard unix-ey tools you could get by. For example, want to list services? Just use `ls /etc/init.d/`. Want to monitor a log file? Use something like `tail -f /var/log/whatever`. Want to see what filesystems are supposed to be mounter? Just opne /etc/fstab with your favorite text editor. Sure, it wasn't super consistent but you used the same tools as you always used, whether you're editing so…

Except on big iron UNIXes that introduced such concepts years before it became such a big issue on Linux.

Re: Ask HN: What did Linux not do right?

#43
post #36

How Linux freezes under high memory usage, Mac OS and Windows both handle such situations well without requiring a hard reboot.

If that was the case, macOS and windows would own the server market because who would want to have a server that "freezes" under "heavy memory load". MacOS is virtually non-existent and Windows has a small share of the market and performs poorly comparison.

by "freezes", 'deeter72 almost certainly means that the user interface becomes unresponsive, which is not relevant for servers.

windows has policies that prioritize maintaining user interface and foreground app responsiveness.

Re: Ask HN: What did Linux not do right?

#44
post #22

The desktop experience is still a mess. They’ve become complacent with ‘it works out of the box’ but that’s not the bar. Apple sets the bar and there’s no prize for second place. You’re on Apple or Linux or brain damaged and using Windows, but nobodies using two as their primary driver, and so one ecosystem dominates. I’m glad it’s Apple because the GNU crowd are virtue signalers first and software developers second.…

Quoted post unavailable.

Linux can’t even do a “smooth” trackpad experience. Not to mention HiDPI monitors didn’t work last time I tried.

I use Linux when I specifically do not want a desktop. A headless server.

Re: Ask HN: What did Linux not do right?

#45

Earlier quoted context omitted.

people that are militantly anti-systemd confuse me greatly. the different and inconsistent init systems that preceded it were a nightmare. it led to a whole ecosystem of secondary system to manage apps, god, runit, monit, supervisord, etc. now i can just write a simple configuration file and have my app managed. i can describe network filesystem mounts as dependencies. blah blah. systemd made all of this trivial.

Before if you knew the standard unix-ey tools you could get by. For example, want to list services? Just use `ls /etc/init.d/`. Want to monitor a log file? Use something like `tail -f /var/log/whatever`. Want to see what filesystems are supposed to be mounter? Just opne /etc/fstab with your favorite text editor. Sure, it wasn't super consistent but you used the same tools as you always used, whether you're editing so…

> if you knew the standard unix-ey tools you could get by

And if you know the standard systemd tools, you can get by with systemd. It's far from enigmatic, the docs are freely available. Yes, systemd does things differently from what you might be used to, but I don't see how that's an issue beyond having to surf the usual learning curve of a new tool.

> how do I see what services are available under systemd?

  systemctl list-units --type=service
> How can I reliable see what file systems are supposed to be mounted at boot?

You can still use /etc/fstab, systemd will parse it at boot time. For mount units, you can use:

  systemctl list-unit-files --type=mount
> The answer to both of those tends to be "systemd spreads it's files and configuration all around the filesystem to you need to learn some bespoke systemd command that you'll only ever use for systemd"

  /etc/systemd or /usr/lib/systemd for global stuff
  $HOME/.config/systemd for per-user stuff
That's pretty much it for unit files.

Re: Ask HN: What did Linux not do right?

#47

Earlier quoted context omitted.

people that are militantly anti-systemd confuse me greatly. the different and inconsistent init systems that preceded it were a nightmare. it led to a whole ecosystem of secondary system to manage apps, god, runit, monit, supervisord, etc. now i can just write a simple configuration file and have my app managed. i can describe network filesystem mounts as dependencies. blah blah. systemd made all of this trivial.

Before if you knew the standard unix-ey tools you could get by. For example, want to list services? Just use `ls /etc/init.d/`. Want to monitor a log file? Use something like `tail -f /var/log/whatever`. Want to see what filesystems are supposed to be mounter? Just opne /etc/fstab with your favorite text editor. Sure, it wasn't super consistent but you used the same tools as you always used, whether you're editing so…

>> For example, want to list services? Just use `ls /etc/init.d/`

You can do systemctl list-unit-files

If you want to see the enabled services, then add --state=enabled , for disable --state=disabled. You can grep for those words as well.

>> Want to monitor a log file? Use something like `tail -f /var/log/whatever`

You can still do that.

With systemd, You can use journalctl to tail the log file by journalctl -u -f , so something like journalctl -u postfix -f

You can use journalctl to search for logs in a specified time period journalctl -u postfix --since "2022-09-30 15:10:00" --until "2022-10-01 02:00:00"

Want to see a log for a specific boot ?

journalctl --list-boots journalctl -b

You can view more about journalctl at https://linuxhandbook.com/journalctl-command/

>> How can I reliable see what file systems are supposed to be mounted at boot?

I still use fstab for this.

>> Sure, it wasn't super consistent but you used the same tools as you always used to.

You can still use most of the same tools. I use tail,grep,awk like I used to, but I like the fact that with systemd I get a system configuration layer (which includes the init system) rather than having different tools in each distro.

Do you prefer the old init system because it is something you are used to (and do not want to change) or do you have specific instances where systemd is broken for you ?

Re: Ask HN: What did Linux not do right?

#48
post #43
post #36

Earlier quoted context omitted.

If that was the case, macOS and windows would own the server market because who would want to have a server that "freezes" under "heavy memory load". MacOS is virtually non-existent and Windows has a small share of the market and performs poorly comparison.

by "freezes", 'deeter72 almost certainly means that the user interface becomes unresponsive, which is not relevant for servers. windows has policies that prioritize maintaining user interface and foreground app responsiveness.

see also:

https://lore.kernel.org/all/d9802b6a-949b-b327-c4a6-3dbca485...

https://lore.kernel.org/all/20211130201652.2218636d@mail.inb...

Re: Ask HN: What did Linux not do right?

#49

Not Linux, but Systemd[0] makes many people angry. Entire distros have purposefully not included it. Look at Devuan[1] [0] https://en.m.wikipedia.org/wiki/Systemd [1] https://www.devuan.org/

>Not Linux, but Systemd

Or maybe it is Linux's choice to not build an official default init system like BSDs that led to all the drama.

Re: Ask HN: What did Linux not do right?

#50
post #47

Earlier quoted context omitted.

Before if you knew the standard unix-ey tools you could get by. For example, want to list services? Just use `ls /etc/init.d/`. Want to monitor a log file? Use something like `tail -f /var/log/whatever`. Want to see what filesystems are supposed to be mounter? Just opne /etc/fstab with your favorite text editor. Sure, it wasn't super consistent but you used the same tools as you always used, whether you're editing so…

>> For example, want to list services? Just use `ls /etc/init.d/` You can do systemctl list-unit-files If you want to see the enabled services, then add --state=enabled , for disable --state=disabled. You can grep for those words as well. >> Want to monitor a log file? Use something like `tail -f /var/log/whatever` You can still do that. With systemd, You can use journalctl to tail the log file by journalctl -u -f ,…

>>You can do systemctl list-unit-files

Sure, but how is that an improvement over locality-of-behavior and having unit files in easily known locations? Here's a rough list of places you can find unit files:

    #Places you can find systemd unit files
    /etc/systemd/system/*
    /run/systemd/system/*
    /lib/systemd/system/*
    ...

    $XDG_CONFIG_HOME/systemd/user/*
    $HOME/.config/systemd/user/*
    /etc/systemd/user/*
    $XDG_RUNTIME_DIR/systemd/user/*
    /run/systemd/user/*
    $XDG_DATA_HOME/systemd/user/*
    $HOME/.local/share/systemd/user/*
    /usr/lib/systemd/user/*
Now if you simplified that list you wouldn't need to learn a new tool and either memorize or look up a bunch of arguments. You could just have a sane directory structure and use some path globing.

With a bit more work (or possibly just a different balancing of priorities, with more care taken to locality of behavior) I think you wouldn't need some other tool.

I think you're really missing the point here, unix (the philosophy, not the implementation) is a programming environment. Yes, systemd has created tools to let you do most of the things you used to be able to do using standard tools, but there's a big difference between having a tool box and having a program feature.

A more complicated example, inotifyd is very useful, how could I go about triggering a script every time a log file is written to under systemd? When you start looking at these tools as part of a cohesive programming environment than you start to see systemd as full of edge-cases you have to account for. Lets say I want to count how many times a particular event appears in a log (quickly and easily, this isn't production) and send it to my cellphone. In unix-philosophy I can add something like this to my inotifyd-tab, `grep "some-event" | wc -l | pushbullet --push my stream`. How could I do something like that in systemd-land?

>Do you prefer the old init system because it is something you are used to (and do not want to change) or do you have specific instances where systemd is broken for you ?

I can see you're already dismissing the "unix philosophy" complaint, and really that is where I'd like to focus. Systemd will keep getting better in most cases, so that fact that I've had frustrations with it in the past isn't really a big deal. I'd be willing to deal with that if it was actually, you know, better than something like openrc.

But since you've asked, here's a non-exhaustive list of points that I've been frustrated enough to actually document them. I imagine a lot of them have been fixed by now.

Years ago I wanted to run debian on a kobo ereader. Unfortunately the built-in OS image was not running systemd, and the kernal was several revisions out of date. While I had no problem getting a debian chroot running, all of the services were designed to run under systemd, this made the whole project much more of a pain in the ass than it should have been.

By default systemd will kill long-running processes when I log out. Processes like screen or tmux. This has since been resolved, presumably by my distro somewhere, but took a solid while to figure out when that behavior suddenly changed.

When troubleshooting a raid array using a mipsel processor, I had persistent network issues. I took the boot media out for trouble shooting, but when I ~~chrooted~~ systemd-nspawned into the host to try to address the problem, I discovered that journalctl would segault. Thankfully /var/log still had all the entries I needed to fix the problem and binary logging wasn't enabled, or that would have been a much bigger problem. This appeared to be a general issue with running journalctl using qemu-static and binfmt.

For some reason my mother's computer can no longer resolve DNS. Ripping out systemd-resolved seemes to have fixed it, but not before I lost a few more hours.

Post reply on HN