mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge pull request #2036 from SPccman/master
Meet systemd, the controversial project taking over a Linux distro near you
This commit is contained in:
commit
c89d8ada43
@ -1,91 +0,0 @@
|
||||
spccman translating
|
||||
Meet systemd, the controversial project taking over a Linux distro near you
|
||||
================================================================================
|
||||
![](http://core4.staticworld.net/images/article/2014/10/linux-attack-100528169-gallery.jpg)
|
||||
|
||||
Systemd is one of the most controversial projects in Linux-land right now. How controversial? So controversial that Lennart Poettering, one of systemd’s developers, even [claims][1] that horrible people have been pooling [Bitcoins][2] to hire a hitman on him. On a more reasonable level, there’s a [Boycott systemd website][3] that argues for a boycott of this software on various technical merits.
|
||||
|
||||
All this backlash is a reaction to systemd’s success. It has been—or is being—adopted by Linux distributions from Fedora and OpenSuSE to Ubuntu, Debian, and even Arch Linux. GNOME is becoming more dependent on it over time—one of Debian’s stated reasons for [switching back to GNOME][4] was because of its systemd integration. It’s everywhere.
|
||||
|
||||
So what’s all the hub-bub—and the fierce backlash—about? Let’s look a bit closer at this raging battle.
|
||||
|
||||
### Systemd is a new init system ###
|
||||
|
||||
At its core, [systemd][5] is a replacement for the old [SysV init][6] system. The init system is the software that initializes your system. When you boot up, init is responsible for loading the appropriate drivers, activating your network connection, launching various system services, and finally bringing up the graphical login screen where you log in. SysV init is an old system that basically just runs scripts located under **/etc/init.d**.
|
||||
|
||||
> Want to stay up to date on Linux, BSD, Chrome OS, and the rest of the World Beyond Windows? Bookmark the [World Beyond Windows column page][7] or follow [our RSS feed][8].
|
||||
|
||||
At its core, systemd is a modern replacement for the old and crufty SysV init. It can also launch services in response to events; for example, when you plug in a USB printer, it could launch the printing service in response to the device being plugged in. When it receives a connection on a specific network port, it could launch a network service configured to listen on that port and pass the connection along.
|
||||
|
||||
For more technical information about SysV init vs. systemd, read Jorgen Schäfer’s “[Why systemd?][9]”
|
||||
|
||||
### But systemd is more than that ###
|
||||
|
||||
Even systemd’s detractors largely agree that SysV is old and needs to be replaced. But critics correctly note that systemd is in fact more than that. It’s a large project containing many other bits of functionality. It’s a software suite, not just an init system.
|
||||
|
||||
![An illustration of systemd's structure.](https://cms-images.idgesg.net/images/article/2014/10/systemd-diagram-100528171-orig.png)
|
||||
|
||||
[Wikimedia Commons][10]
|
||||
|
||||
An illustration of systemd's structure.
|
||||
|
||||
The systemd project also contains logind, a daemon that manages user logins, and journald, an event-logging system that controversially writes to binary files and not text ones. Systemd has also absorbed [the udev project][11] and its code, which handles the management of virtual device files in the **/dev/** directory and events when devices are plugged in and unplugged. The list goes on and on: systemd also includes a [cron][12]-style task scheduler and networkd, a daemon for managing network connections.
|
||||
|
||||
More recently, systemd is gaining consoled, a user-mode console daemon that can be used when Linux’s virtual terminal code is stripped out of the kernel itself. The kernel developers seem happy to get this stuff out of the kernel and into user-space , but some people have to be thinking: Does systemd really have to take over this as well?
|
||||
|
||||
### Critics say it’s not Unix-like ###
|
||||
|
||||
Many of the complaints to systemd stem from a feeling that this huge project is increasing in scope and taking over too much of the Linux system. Not surprisingly, the Boycott systemd site starts with this exact complaint:
|
||||
|
||||
> “Systemd flies in the face of the Unix philosophy: ‘do one thing and do it well,’ representing a complex collection of dozens of tightly coupled binaries. Its responsibilities grossly exceed that of an init system, as it goes on to handle power management, device management, mount points, cron, disk encryption, socket API/inetd, syslog, network configuration, login/session management, readahead, GPT partition discovery, container registration, hostname/locale/time management, mDNS/DNS-SD, the Linux console and other things all wrapped into one.”
|
||||
|
||||
Ubuntu’s Mark Shuttleworth originally [called systemd][13] “hugely invasive and hardly justified” when Ubuntu was sticking with their own “upstart” init system. Ubuntu eventually gave up that fight and is switching to systemd. The change will show up [in the Ubuntu Desktop Next images][14] starting in the 15.04 update cycle.
|
||||
|
||||
### So, systemd: good or bad? ###
|
||||
|
||||
Oh boy, here we go. This is the part of the article where I have to wrap everything up with a nice bow and make a pronouncement about which side is right.
|
||||
|
||||
![](https://cms-images.idgesg.net/images/article/2013/09/linux-penguin-100055693-medium.png)
|
||||
|
||||
The original idea of systemd is definitely good. Linux needs a replacement for the old SysV init system and clunky SysV init scripts, and a sleek, modern system daemon that can respond to more types events and manage daemons more intelligently is a great idea. However, it’s true that systemd seems to be growing into a monolithic system layer that lives just above the Linux kernel.
|
||||
|
||||
*But*, although Linux is a community-developed project, it’s not for the peanut gallery—whether it’s a PCWorld columnist or a gaggle of Internet commenters—to decide how it evolves. It’s for the people actually getting their hands dirty with the code and involving themselves in these projects. And, interestingly enough, Linux distributions and the people involved in them seem mostly to be moving toward systemd integration.
|
||||
|
||||
Even Linux creator Linus Torvalds (who [isn’t afraid to say what he thinks][15]) doesn’t seem to mind systemd. As he told [ZDNet][16]:
|
||||
|
||||
> "I don't actually have any particularly strong opinions on systemd itself. I've had issues with some of the core developers that I think are much too cavalier about bugs and compatibility, and I think some of the design details are insane (I dislike the binary logs, for example), but those are details, not big issues."
|
||||
|
||||
If Linus Torvalds doesn’t have any big issues with the design of systemd, perhaps it’s not all bad. If you’d like a calm look at why a Linux distribution might want to go with systemd, [Debian’s systemd discussion document][17] is good reading.
|
||||
|
||||
What do you think of systemd? Sound off in the comments! Just try to keep it civil, folks—swaying opinions on contentious issues takes level-headed talk.
|
||||
|
||||
*This article has been updated to clarify when systemd is appearing in the Ubuntu Desktop Next images. It originally erroneously stated the change already took place. *
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.pcworld.com/article/2841873/meet-systemd-the-controversial-project-taking-over-a-linux-distro-near-you.html
|
||||
|
||||
作者:[Chris Hoffman][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.pcworld.com/article/2841873/meet-systemd-the-controversial-project-taking-over-a-linux-distro-near-you.html#chrishoffman
|
||||
[1]:https://plus.google.com/app/basic/stream/z13rdjryqyn1xlt3522sxpugoz3gujbhh04
|
||||
[2]:http://www.pcworld.com/article/2033715/7-things-you-need-to-know-about-bitcoin.html
|
||||
[3]:http://boycottsystemd.org/
|
||||
[4]:http://www.pcworld.com/article/2691192/how-gnome-3-14-is-winning-back-disillusioned-linux-users.html
|
||||
[5]:http://www.freedesktop.org/wiki/Software/systemd/
|
||||
[6]:http://en.wikipedia.org/wiki/Init#SysV-style
|
||||
[7]:http://www.pcworld.com/column/world-beyond-windows/
|
||||
[8]:http://www.pcworld.com/blog/world-beyond-windows/index.rss
|
||||
[9]:http://blog.jorgenschaefer.de/2014/07/why-systemd.html
|
||||
[10]:http://en.wikipedia.org/wiki/File:Systemd_components.svg
|
||||
[11]:http://en.wikipedia.org/wiki/Udev
|
||||
[12]:http://en.wikipedia.org/wiki/Cron
|
||||
[13]:http://www.markshuttleworth.com/archives/1295
|
||||
[14]:http://www.pcworld.com/article/2836984/why-ubuntu-1410-utopic-unicorns-humble-changes-are-the-calm-before-the-storm.html
|
||||
[15]:http://www.maximumpc.com/article/news/linus_torvalds_tosses_f-bombs_middle_fingers_and_general_disdain_nvidia
|
||||
[16]:http://www.zdnet.com/linus-torvalds-and-others-on-linuxs-systemd-7000033847/
|
||||
[17]:https://wiki.debian.org/Debate/initsystem/systemd
|
@ -0,0 +1,84 @@
|
||||
systemd这个有争议的项目正在接管你身边的Linux发行版
|
||||
=========
|
||||
![](http://core4.staticworld.net/images/article/2014/10/linux-attack-100528169-gallery.jpg)
|
||||
|
||||
systemd 是目前为止在Linux平台上最有争议的项目之一。它到底有多大的争议?它的争议大到systemd的开发者之一Lennart Poettering 声称有人使用[比特币][2]雇佣职业杀手要干掉他。但是还是有比较理智的做法的,有一个[抵制systemd网站][3]在技术角度上提出了抵制systemd的原因。
|
||||
|
||||
如此强烈的抵制也反映了systemd的成功。它已经被或将要被Fedroa、OpenSUSE、Ubuntu、Debian、Arch Linux等众多发型版采用。随着时间推移,GNOME越来越依赖它,Debian[回归GNOME][4]的原因之一就是它采用了systemd。systemd无处不在。
|
||||
|
||||
那么如此激烈的争论到底是关于什么呢?让我们及距离观察这场战争。
|
||||
|
||||
|
||||
###Systemd是一个全新的init
|
||||
|
||||
[systemd][5]的核心是取代老旧的[SysV init][6]。init用来初始化你的操作系统,当你启动系统时,init负责加载需要的驱动,激活你的网络链接,启动众多的系统服务,最后进入图形登陆界面。而SysV init 是一个老旧的系统,它基本上仅运行**/etc/init.d**目录下的一些脚本。
|
||||
|
||||
systemd是一个现代技术用以取代老旧以及粗糙的SysV init。它可以在接收到事件响应时启动相关服务;比如,当你接入了一个USB打印机,systemd可以在接收到设备接入响应时启动打印服务。当它接收到某个网络端口的连接请求时,它可以启动在此端口上监听的服务并且传递这个连接。
|
||||
|
||||
获取更多关于SysV init 与 systemd的信息,可以参考Jorgen Schäfer的 “[Why systemd?][9]”
|
||||
|
||||
###但是systemd远不止此###
|
||||
|
||||
systemd的反对者之中也有部分人认为SysV太老了,应该被取代掉。但是批评systemd的人发现Systemd是一个巨大的项目,其中包括了很多其他的功能。它是一个软件套件,而不仅仅是一个init。
|
||||
|
||||
![An illustration of systemd's structure.](https://cms-images.idgesg.net/images/article/2014/10/systemd-diagram-100528171-orig.png)
|
||||
|
||||
[维基共享资源][10]
|
||||
|
||||
|
||||
systemd 结构图解。
|
||||
|
||||
systemd包括用于管理用户登陆的守护进程logind,还包括journald,并且journald 颇有争议的使用了二进制形式保存系统日志而不是以文本形式。systemd也采用了[udev][11]的思想及代码,它对**/dev/**目录下的虚拟设备文件进行管理,并且处理设备接入或推出时所产生的事件。除了这些还有很多其他的,如:systemd还包括了[cron][12]风格的任务调度器与网络守护进程networkd。
|
||||
|
||||
###抨击者认为systemd不是类UNIX风格
|
||||
|
||||
多数的抱怨源于人们认为systemd项目太大以至于超出了它的工作范围,并且它从Linux系统接管的部分太多了。不要感到惊奇,systemd的抵制活动是以下面的抱怨开始的:
|
||||
|
||||
>"systemd文件是一大堆的复杂的高度耦合的二进制组成的,这违反了UNIX哲学:“做一件事情,并把它做好”。它超出了一个init程序的职责范围,因为它还有电源管理,设备管理,挂载管理,cron(定时执行工具),磁盘加密,socket接口/inetd,syslog,网络配置,登陆/绘画管理,文件预读,GPT分区发现,容器注册,hostname/locale/time管理,mDNS/DNS-SD等功能,它将Linux控制台以及其他的一些功能都包装在一个程序里面。
|
||||
|
||||
##那么,systemd是好是坏?
|
||||
|
||||
到这里,我判断一下,到底谁是正确的。
|
||||
|
||||
![](https://cms-images.idgesg.net/images/article/2013/09/linux-penguin-100055693-medium.png)
|
||||
|
||||
systemd最初的想法是非常好的。Linux需要一个新的东西来替换老的SysV init和沉重的 SysV init 脚本,这个新的程序应该是灵活的,现代化的系统守护进程,它可以响应更多类型,并且智能化的管理众多的守护进程。然而,事实上systemd好像成为了一个仅依赖Linux核心的完全统一的系统层。
|
||||
|
||||
*但是*,尽管Linux是一个社区开发项目,但它不是为PC世界的专栏作家或者是一群网络评论者提供的,这些人都不能决定它的进化与发展。只有那些亲手贡献代码以及全身心投入的人才有这个资格。巧的是,Linux发行版以及那些参与者好像大部分都倾向与systemd。
|
||||
|
||||
>'我对于systemd本身并没有很强烈的个人看法。我与核心开发人员争论过它的bug与兼容性,并且我认为它的一些设计是愚蠢的(比如二进制的日志),但这只是细节,不是大问题。
|
||||
|
||||
如果Linux Torvald 对于systemd的设计没有什么反对意见,那么说明它可能还是不错的。如果你想平静的看下为什么Linux发型版要使用systemd的话,我推荐这篇文章,[Debian's systemd discussion document][13]。
|
||||
|
||||
你是如何看systemd的,可以在评论回复!但是请文明讨论。
|
||||
|
||||
*更新这篇文章以澄清之前的错误,ubuntu 桌面版将在下一个版本中纳入systemd。之前我们错误的认为ubuntu已经使用了systemd*(这段应该不用了吧,校对把握一下吧)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.pcworld.com/article/2841873/meet-systemd-the-controversial-project-taking-over-a-linux-distro-near-you.html
|
||||
|
||||
作者:[Chris Hoffman][a]
|
||||
译者:[SPccman](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://www.pcworld.com/article/2841873/meet-systemd-the-controversial-project-taking-over-a-linux-distro-near-you.html#chrishoffman
|
||||
[1]:https://plus.google.com/app/basic/stream/z13rdjryqyn1xlt3522sxpugoz3gujbhh04
|
||||
[2]:http://www.pcworld.com/article/2033715/7-things-you-need-to-know-about-bitcoin.html
|
||||
[3]:http://boycottsystemd.org/
|
||||
[4]:http://www.pcworld.com/article/2691192/how-gnome-3-14-is-winning-back-disillusioned-linux-users.html
|
||||
[5]:http://www.freedesktop.org/wiki/Software/systemd/
|
||||
[6]:http://en.wikipedia.org/wiki/Init#SysV-style
|
||||
[7]:http://www.pcworld.com/column/world-beyond-windows/
|
||||
[8]:http://www.pcworld.com/blog/world-beyond-windows/index.rss
|
||||
[9]:http://blog.jorgenschaefer.de/2014/07/why-systemd.html
|
||||
[10]:http://en.wikipedia.org/wiki/File:Systemd_components.svg
|
||||
[11]:http://en.wikipedia.org/wiki/Udev
|
||||
[12]:http://en.wikipedia.org/wiki/Cron
|
||||
[13]:http://www.markshuttleworth.com/archives/1295
|
||||
[14]:http://www.pcworld.com/article/2836984/why-ubuntu-1410-utopic-unicorns-humble-changes-are-the-calm-before-the-storm.html
|
||||
[15]:http://www.maximumpc.com/article/news/linus_torvalds_tosses_f-bombs_middle_fingers_and_general_disdain_nvidia
|
||||
[16]:http://www.zdnet.com/linus-torvalds-and-others-on-linuxs-systemd-7000033847/
|
||||
[17]:https://wiki.debian.org/Debate/initsystem/systemd
|
Loading…
Reference in New Issue
Block a user