• 0 Posts
  • 16 Comments
Joined 1 年前
cake
Cake day: 2023年7月26日

help-circle









  • Malware sadly is a problem everywhere, but it is arguably less so on Linux. First, Linux is less popular so less malware is written for it to some degree. That doesn’t mean no malware, but if you’re trying to pwn people hitting a website you’ll get more targetting windows, android, or iOS than Linux so it’s a little less prevalent.

    Second, it could be argued the security model of Linux is more secure than windows. This is a far more contentious point, but I think that simply from having more eyes on the code Linux has a more secure model. Windows relies on security through obscurity a great deal, and if you talk to cybersecurity experts they will often tell you this is no security at all.

    Lastly, because software on Linux is typically installed through centralized repositories of binaries or sandboxed app images, you have to go more out of your way to get dodgy software on Linux. The tradeoff there is that a lot of proprietary apps and helper programs that come with some tech will never be available in the repos and that can send some new users to try finding them elsewhere with all the risks that entails. Some distros go for a middle ground with access to things like the Arch User Repositories, but Ubuntu’s solution is using things like PPA’s to add extra software repositories.



  • Just as an addendum to your answer. In the command writing to mullvad.list the | sudo tee /etc/apt/sources.list.d/mullvad.list is using two helpful linux utilities to modify the command. The first is the | which is called a pipe and connects the text output of one program to the text input of another. The pipe is connecting the output of echo which simply prints a string, in this case composed of the outputs of several other commands to the program tee. Tee which is given admin privileges by the sudo takes an input stream and splits it between two files. In this case those are mullvad.list and since no other was provided stdout the output pipeline of the terminal running the command.

    EDIT:

    In the interest of further completeness. Another utility used in those commands is the command substitution operator of sh. So when the terminal is interpretting text $(some command) gets substituted out for the text output by the command in the parentheses. It is another common way of connecting commands on the shell to allow for more flexible and powerful commands.



  • I understand what you mean. If you are on the fence and not super interested in init systems, you can pretty easily get by with systemd without thinking about it. Most desktop environments have tools to manage user services in easy GUI’s, and you can find guides for anything more advanced you want to accomplish with them usually.

    If you want to dive in though, systemd is a great init system to learn. Nowadays learning systemd is a lot less of a moving target, and it’s in use virtually everywhere so the knowledge is valuable. It’s also fairly well documented at this point, which is great for learning how it works.

    My personal advice if you want to go that path is to just open up some service files. There are lots of interesting examples in /lib/systemd/system Systemd service files are just plain text, and pretty straightforward to read. Its divided into nice sections, and naming is pretty straightforward (Or the systemd brainworms are really in deep). Look for names you recognize or programs you use. Especially ones you are familiar with on the command line. I don’t recommend changing them to start, especially in the system directory, just open a couple and you should quickly start seeing the connections between what they are trying to accomplish and whats in each file. Then if you see anything you don’t understand or peaks your curiousity check the documentation. Once you’re ready try writing one of your own for something in the usr service directory. No pressure though, its not necessarily essential knowledge


  • I see way more posts that are pro-systemd than anti these days, so I think you might be tilting at windmills a bit.

    I would love to think about systemd less, but I’ve worked with it professionally since a year or so before Debian switched while I was an intern working in embedded. I got to see the flame wars and shaped my opinion of systemd by wrestling with its growing pains. Writing your own service files and working with DBus was ass back then, and while it has gotten better, my patience with it has diminished. In the end the frustration was enough that after I ditched windows, systemd was the next to go.

    That would be the end of it, but other programs keep growing annoying systemd dependencies or their projects get swallowed up by the systemd ecosystem entirely. I was so excited at the start to work with the parallel execution and dependency management, but the number of times systemd broke something, swallowed up the output, and then corrupted its own journal and lost the logs really turned me against it.