Book Excerpt: A Practical Guide to Fedora and Red Hat Enterprise Linux
The init Daemon
The init daemon is the system and service manager for Linux. It is the first true process Linux starts when it boots and as such, has a PID of 1 and is the ancestor of all processes. The init daemon has been around since the early days of UNIX, and many people have worked to improve it. The first Linux init daemon was based on the UNIX System V init daemon and is referred to as SysVinit (System V init daemon).
Because SysVinit does not deal well with modern hardware, including hotplug devices, USB hard and flash drives, and network-mounted filesystems, Fedora/RHEL recently replaced it with the Upstart init daemon (http://upstart.ubuntu.com/ and http://upstart.ubuntu.com/wiki). Fedora 15 has moved past Upstart to systemd init daemon, which is described next. Several other replacements for SysVinit are also available. One of the most prominent is initng (http://initng.sourceforge.net/trac). In addition, Solaris uses SMF (Service Management Facility), and MacOS uses launchd.
The systemd init Daemon (Fedora)
The name systemd comprises system, which systemd manages, followed by d. Under UNIX/Linux, daemon names frequently end in d: systemd is the system daemon. At boot time, systemd renames itself init, so you will not see a process named systemd. However, init is simply a link to systemd:
$ ls -l /sbin/init lrwxrwxrwx. 1 root root 14 04-22 08:47 /sbin/init -> ../bin/systemd
The name is also a play on words with System D, a reference to the French dérouillard (to untangle) or démerder. System D is a manner of responding to challenges that requires fast thinking, adapting, and improvising.
The systemd init daemon is a drop-in replacement for SysVinit; most of the administration tools that worked with SysVinit and Upstart work with systemd. Although systemd is new, most of the user interfaces pertinent to administrators will remain stable (http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise). A GUI to systemd is under development.
More Information
Local
Use apropos to list man pages that pertain to systemd (apropos systemd). Some of the most interesting of these are systemd, systemctl, systemd.unit, and systemd.special.
Web
systemd home page: http://www.freedesktop.org/wiki/Software/systemd
Fedora systemd home page: fedoraproject.org/wiki/Systemd
Fedora systemd feature list: fedoraproject.org/wiki/Features/systemd
SysVinit to systemd conversion notes: fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet
List of services that run natively under systemd: http://fedoraproject.org/wiki/User:Johannbg/QA/Systemd/compatability
Blog about systemd by its creator, Lennart Poettering: 0pointer.de/blog/projects/systemd.html
systemd stability promise: http://www.freedesktop.org/wiki/Software/systemd/InterfaceStabilityPromise
cgroups: http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
Service Units and Target Units
The systemd init daemon is based on the concept of units, each of which has a name and type. Typically information about a unit is stored in a file that has the same name as the unit (e.g., dbus.service). The types of units are service, socket, device, mount, automount, target, snapshot, timer, swap, and path. This section discusses service and target units, which are critical to controlling daemons and runlevel under systemd.
Service unit
A service unit refers to a daemon (service) that systemd controls, including those controlled natively by systemd and those controlled by systemd via SysVinit scripts. For example, systemd controls the ntpd daemon natively via the ntpd.service service unit.
Target unit
A target unit groups other units. Of concern in this section are targets that control the system runlevel. By default, Fedora activates graphical.target, which brings the system to a runlevel that equates to what was formerly called runlevel 5 (multiuser graphical mode). Activating multi-user.target brings the system to what was formerly called runlevel 3 (multiuser textual mode).
Terminology: server, service, daemon
A daemon, such as ntpd or cupsd, provides a service that runs on a server. The daemon itself is also sometimes referred to as a server. These three terms can be used interchangeably.
Runlevels
The systemd init daemon does not support runlevels the way SysVinit did. It supports target units, which parallel runlevels but are different. To ease the transition, this book continues to use the term runlevel to refer to target units. One difference between SysVinit runlevels and systemd target units is that the former can be changed only when the system changes runlevels while the latter can be activated by any of a large group of triggers. Another difference is that a systemd-based system can activate more than one target unit at a time, allowing the system to be in more than one runlevel at a time. For example, graphical.target pulls in multi-user.target so they are both active at the same time.
systemd runlevels differ from SysVinit runlevels - For consistency and clarity during the transition from SysVinit to systemd, this book refers to systemd target units as runlevels. Target units are not true runlevels, but they perform a function similar to the function performed by SysVinit runlevels.
Wants and Requires
Under systemd, the terms wants and requires specify units that are to be activated when the unit that wants or requires the other unit is activated. A unit that requires another unit will not start if the other unit is not available and will quit if the other unit becomes unavailable while the first unit is active. Wants is similar to requires, except a unit that wants another unit will not fail if the wanted unit is not available.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Linux Systems Administrator
- New Products
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Have you tried Boxen? It's a
4 hours 22 min ago - seo services in india
8 hours 54 min ago - For KDE install kio-mtp
8 hours 54 min ago - Evernote is much more...
10 hours 55 min ago - Reply to comment | Linux Journal
19 hours 40 min ago - Dynamic DNS
20 hours 14 min ago - Reply to comment | Linux Journal
21 hours 13 min ago - Reply to comment | Linux Journal
22 hours 3 min ago - Not free anymore
1 day 2 hours ago - Great
1 day 5 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
Service units, is a daemon
Service units, is a daemon (service) systemd control, including, itself systemd control SysVinit script by systemd control. For example, systemd control ntpd daemon through ntpd.service service units.
I think that the system works
I think that the system works really good and I am sure that there will be a lot of users which will want to use it.
Asigurari Auto
Not "dérouillard"
Good article.
[It's not dérouillard (which sounds more like some anti-rusting thing) but «débrouillard» which has connotations of "muddling along".]
More usefully, Lennart Poettering has a good series of articles on his own blog about using systemd:
http://0pointer.de/blog/projects/why.html
http://0pointer.de/blog/projects/systemd-for-admins-1.html
http://0pointer.de/blog/projects/systemd-for-admins-2.html
http://0pointer.de/blog/projects/systemd-for-admins-3.html
http://0pointer.de/blog/projects/systemd-for-admins-4.html
http://0pointer.de/blog/projects/three-levels-of-off.html
http://0pointer.de/blog/projects/changing-roots
http://0pointer.de/blog/projects/blame-game.html
http://0pointer.de/blog/projects/the-new-configuration-files.html
http://0pointer.de/blog/projects/on-etc-sysinit.html
http://0pointer.de/blog/projects/instances.html
http://0pointer.de/blog/projects/inetd.html
Ok
Ok
Title Spell Check?
Excerpt not 'Exercpt'... good read though.