<s>
udev	B-Application
(	O
userspace	B-Operating_System
)	O
is	O
a	O
device	O
manager	O
for	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
As	O
the	O
successor	O
of	O
devfsd	B-Application
and	O
hotplug	B-Device
,	O
udev	B-Application
primarily	O
manages	O
device	B-Application
nodes	I-Application
in	O
the	O
directory	O
.	O
</s>
<s>
At	O
the	O
same	O
time	O
,	O
udev	B-Application
also	O
handles	O
all	O
user	B-Operating_System
space	I-Operating_System
events	O
raised	O
when	O
hardware	O
devices	O
are	O
added	O
into	O
the	O
system	O
or	O
removed	O
from	O
it	O
,	O
including	O
firmware	B-Application
loading	O
as	O
required	O
by	O
certain	O
devices	O
.	O
</s>
<s>
It	O
is	O
an	O
operating	B-General_Concept
system	I-General_Concept
's	O
kernel	B-Operating_System
that	O
is	O
responsible	O
for	O
providing	O
an	O
abstract	O
interface	O
of	O
the	O
hardware	O
to	O
the	O
rest	O
of	O
the	O
software	O
.	O
</s>
<s>
Being	O
a	O
monolithic	B-Operating_System
kernel	I-Operating_System
,	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
does	O
exactly	O
that	O
:	O
device	B-Application
drivers	I-Application
are	O
part	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
and	O
make	O
up	O
more	O
than	O
half	O
of	O
its	O
source	O
code	O
.	O
</s>
<s>
Hardware	O
can	O
be	O
accessed	O
through	O
system	B-Operating_System
calls	I-Operating_System
or	O
over	O
their	O
device	B-Application
nodes	I-Application
.	O
</s>
<s>
To	O
be	O
able	O
to	O
deal	O
with	O
peripheral	O
devices	O
that	O
are	O
hotplug-capable	O
in	O
a	O
user-friendly	O
way	O
,	O
a	O
part	O
of	O
handling	O
all	O
of	O
these	O
hotplug-capable	O
hardware	O
devices	O
was	O
handed	O
over	O
from	O
the	O
kernel	B-Operating_System
to	O
a	O
daemon	B-Operating_System
running	O
in	O
user-space	B-Operating_System
.	O
</s>
<s>
Running	O
in	O
user	B-Operating_System
space	I-Operating_System
serves	O
security	O
and	O
stability	O
purposes	O
.	O
</s>
<s>
Device	B-Application
drivers	I-Application
are	O
part	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
in	O
which	O
their	O
primary	O
functions	O
include	O
device	O
discovery	O
,	O
detecting	O
device	O
state	O
changes	O
,	O
and	O
similar	O
low-level	O
hardware	O
functions	O
.	O
</s>
<s>
After	O
loading	O
a	O
device	B-Application
driver	I-Application
into	O
memory	O
from	O
the	O
kernel	B-Operating_System
,	O
detected	O
events	O
are	O
sent	O
out	O
to	O
the	O
userspace	B-Operating_System
daemon	B-Operating_System
udevd	B-Application
.	O
</s>
<s>
In	O
case	O
a	O
new	O
storage	O
device	O
is	O
connected	O
over	O
USB	O
,	O
is	O
notified	O
by	O
the	O
kernel	B-Operating_System
and	O
itself	O
notifies	O
the	O
udisksd-daemon	O
.	O
</s>
<s>
That	O
daemon	B-Operating_System
could	O
then	O
mount	O
the	O
file	O
systems	O
.	O
</s>
<s>
In	O
case	O
a	O
new	O
Ethernet	O
cable	O
is	O
plugged	O
into	O
the	O
Ethernet	O
NIC	O
,	O
is	O
notified	O
by	O
the	O
kernel	B-Operating_System
and	O
itself	O
notifies	O
the	O
NetworkManager-daemon	O
.	O
</s>
<s>
The	O
NetworkManager-daemon	O
could	O
start	O
dhclient	O
for	O
that	O
NIC	O
,	O
or	O
configure	O
according	O
to	O
some	O
manual	O
configuration	O
.	O
</s>
<s>
These	O
must	O
often	O
be	O
invoked	O
in	O
ways	O
that	O
can	O
be	O
awkward	O
to	O
express	O
with	O
the	O
Unix	B-Application
permissions	O
model	O
(	O
for	O
example	O
,	O
allowing	O
users	O
to	O
join	O
wireless	B-General_Concept
networks	I-General_Concept
only	O
if	O
they	O
are	O
logged	O
into	O
the	O
video	O
console	O
)	O
.	O
</s>
<s>
Application	O
authors	O
resort	O
to	O
using	O
setuid	O
binaries	O
or	O
run	O
service	O
daemons	B-Operating_System
to	O
provide	O
their	O
own	O
access	O
control	O
and	O
privilege	O
separation	O
,	O
potentially	O
introducing	O
security	O
holes	O
each	O
time	O
.	O
</s>
<s>
HAL	B-Application
was	O
created	O
to	O
deal	O
with	O
this	O
,	O
but	O
is	O
now	O
deprecated	O
in	O
most	O
Linux	B-Application
distributions	I-Application
.	O
</s>
<s>
Unlike	O
traditional	B-Application
Unix	I-Application
systems	O
,	O
where	O
the	O
device	B-Application
nodes	I-Application
in	O
the	O
directory	O
have	O
been	O
a	O
static	O
set	O
of	O
files	O
,	O
the	O
Linux	B-Operating_System
udev	B-Application
device	O
manager	O
dynamically	O
provides	O
only	O
the	O
nodes	O
for	O
the	O
devices	O
actually	O
present	O
on	O
a	O
system	O
.	O
</s>
<s>
Although	O
devfs	O
used	O
to	O
provide	O
similar	O
functionality	O
,	O
Greg	O
Kroah-Hartman	O
cited	O
a	O
number	O
of	O
reasons	O
for	O
preferring	O
udev	B-Application
over	O
devfs	O
:	O
</s>
<s>
udev	B-Application
supports	O
persistent	O
device	O
naming	O
,	O
which	O
does	O
not	O
depend	O
on	O
,	O
for	O
example	O
,	O
the	O
order	O
in	O
which	O
the	O
devices	O
are	O
plugged	O
into	O
the	O
system	O
.	O
</s>
<s>
The	O
default	O
udev	B-Application
setup	O
provides	O
persistent	O
names	O
for	O
storage	O
devices	O
.	O
</s>
<s>
udev	B-Application
executes	O
entirely	O
in	O
user	B-Operating_System
space	I-Operating_System
,	O
as	O
opposed	O
to	O
devfs	O
's	O
kernel	B-Operating_System
space	I-Operating_System
.	O
</s>
<s>
One	O
consequence	O
is	O
that	O
udev	B-Application
moved	O
the	O
naming	O
policy	O
out	O
of	O
the	O
kernel	B-Operating_System
and	O
can	O
run	O
arbitrary	O
programs	O
to	O
compose	O
a	O
name	O
for	O
the	O
device	O
from	O
the	O
device	O
's	O
properties	O
,	O
before	O
the	O
node	O
is	O
created	O
;	O
there	O
,	O
the	O
whole	O
process	O
is	O
also	O
interruptible	O
and	O
it	O
runs	O
with	O
a	O
lower	O
priority	O
.	O
</s>
<s>
The	O
udev	B-Application
,	O
as	O
a	O
whole	O
,	O
is	O
divided	O
into	O
three	O
parts	O
:	O
</s>
<s>
Library	B-Library
libudev	B-Application
that	O
allows	O
access	O
to	O
device	O
information	O
;	O
it	O
was	O
incorporated	O
into	O
the	O
systemd	B-Application
183	O
software	O
bundle	O
.	O
</s>
<s>
User	B-Operating_System
space	I-Operating_System
daemon	B-Operating_System
that	O
manages	O
the	O
virtual	O
.	O
</s>
<s>
Administrative	O
command-line	B-Application
utility	O
for	O
diagnostics	O
.	O
</s>
<s>
The	O
system	O
gets	O
calls	O
from	O
the	O
kernel	B-Operating_System
via	O
netlink	B-Application
socket	O
.	O
</s>
<s>
Earlier	O
versions	O
used	O
hotplug	B-Device
,	O
adding	O
a	O
link	O
to	O
themselves	O
in	O
with	O
this	O
purpose	O
.	O
</s>
<s>
udev	B-Application
is	O
a	O
generic	O
device	O
manager	O
running	O
as	O
a	O
daemon	B-Operating_System
on	O
a	O
Linux	B-Operating_System
system	O
and	O
listening	O
(	O
via	O
a	O
netlink	B-Application
socket	O
)	O
to	O
uevents	O
the	O
kernel	B-Operating_System
sends	O
out	O
if	O
a	O
new	O
device	O
is	O
initialized	O
or	O
a	O
device	O
is	O
removed	O
from	O
the	O
system	O
.	O
</s>
<s>
The	O
udev	B-Application
package	O
comes	O
with	O
an	O
extensive	O
set	O
of	O
rules	O
that	O
match	O
against	O
exported	O
values	O
of	O
the	O
event	O
and	O
properties	O
of	O
the	O
discovered	O
device	O
.	O
</s>
<s>
A	O
matching	O
rule	O
will	O
possibly	O
name	O
and	O
create	O
a	O
device	B-Application
node	I-Application
and	O
run	O
configured	O
programs	O
to	O
set	O
up	O
and	O
configure	O
the	O
device	O
.	O
</s>
<s>
udev	B-Application
rules	O
can	O
match	O
on	O
properties	O
like	O
the	O
kernel	B-Operating_System
subsystem	O
,	O
the	O
kernel	B-Operating_System
device	B-Application
name	I-Application
,	O
the	O
physical	O
location	O
of	O
the	O
device	O
,	O
or	O
properties	O
like	O
the	O
device	O
's	O
serial	O
number	O
.	O
</s>
<s>
In	O
the	O
past	O
a	O
common	O
way	O
to	O
use	O
udev	B-Application
on	O
Linux	B-Operating_System
systems	O
was	O
to	O
let	O
it	O
send	O
events	O
through	O
a	O
socket	O
to	O
HAL	B-Application
,	O
which	O
would	O
perform	O
further	O
device-specific	O
actions	O
.	O
</s>
<s>
For	O
example	O
,	O
HAL	B-Application
would	O
notify	O
other	O
software	O
running	O
on	O
the	O
system	O
that	O
the	O
new	O
hardware	O
had	O
arrived	O
by	O
issuing	O
a	O
broadcast	O
message	O
on	O
the	O
D-Bus	B-Language
IPC	B-Operating_System
system	O
to	O
all	O
interested	O
processes	B-Operating_System
.	O
</s>
<s>
In	O
this	O
way	O
,	O
desktops	O
such	O
as	O
GNOME	B-Application
or	O
K	B-Language
Desktop	I-Language
Environment	I-Language
3	I-Language
could	O
start	O
the	O
file	B-Application
browser	I-Application
to	O
browse	O
the	O
file	O
systems	O
of	O
newly	O
attached	O
USB	O
flash	O
drives	O
and	O
SD	B-Device
cards	I-Device
.	O
</s>
<s>
By	O
the	O
middle	O
of	O
2011	O
HAL	B-Application
had	O
been	O
deprecated	O
by	O
most	O
Linux	B-Application
distributions	I-Application
as	O
well	O
as	O
by	O
the	O
KDE	O
,	O
GNOME	B-Application
and	O
Xfce	B-Language
desktop	O
environments	O
,	O
among	O
others	O
.	O
</s>
<s>
The	O
functionality	O
previously	O
embodied	O
in	O
HAL	B-Application
has	O
been	O
integrated	O
into	O
udev	B-Application
itself	O
,	O
or	O
moved	O
to	O
separate	O
software	O
such	O
as	O
udisks	B-Application
and	O
upower	B-Application
.	O
</s>
<s>
udev	B-Application
provides	O
low-level	O
access	O
to	O
the	O
linux	B-Operating_System
device	O
tree	O
.	O
</s>
<s>
dbus	B-Language
is	O
a	O
framework	O
to	O
allow	O
programs	O
to	O
communicate	O
with	O
each	O
other	O
,	O
securely	O
,	O
reliably	O
,	O
and	O
with	O
a	O
high-level	O
object-oriented	O
programming	O
interface	O
.	O
</s>
<s>
udisks	B-Application
(	O
formerly	O
known	O
as	O
DeviceKit-disks	O
)	O
is	O
a	O
daemon	B-Operating_System
that	O
sits	O
on	O
top	O
of	O
libudev	B-Application
and	O
other	O
kernel	B-Operating_System
interfaces	O
and	O
provides	O
a	O
high-level	O
interface	O
to	O
storage	O
devices	O
and	O
is	O
accessible	O
via	O
dbus	B-Language
to	O
applications	O
.	O
</s>
<s>
upower	B-Application
(	O
formerly	O
known	O
as	O
DeviceKit-power	B-Application
)	O
is	O
a	O
daemon	B-Operating_System
that	O
sits	O
on	O
top	O
of	O
libudev	B-Application
and	O
other	O
kernel	B-Operating_System
interfaces	O
and	O
provides	O
a	O
high-level	O
interface	O
to	O
power	O
management	O
and	O
is	O
accessible	O
via	O
dbus	B-Language
to	O
applications	O
.	O
</s>
<s>
NetworkManager	B-Protocol
is	O
a	O
daemon	B-Operating_System
that	O
sits	O
on	O
top	O
of	O
libudev	B-Application
and	O
other	O
kernel	B-Operating_System
interfaces	O
(	O
and	O
a	O
couple	O
of	O
other	O
daemons	B-Operating_System
)	O
and	O
provides	O
a	O
high-level	O
interface	O
to	O
network	O
configuration	O
and	O
setup	O
and	O
is	O
accessible	O
via	O
dbus	B-Language
to	O
apps	O
.	O
</s>
<s>
udev	B-Application
receives	O
messages	O
from	O
the	O
kernel	B-Operating_System
,	O
and	O
passes	O
them	O
on	O
to	O
subsystem	O
daemons	B-Operating_System
such	O
as	O
Network	B-Protocol
Manager	I-Protocol
.	O
</s>
<s>
Applications	O
talk	O
to	O
Network	B-Protocol
Manager	I-Protocol
over	O
D-Bus	B-Language
.	O
</s>
<s>
HAL	B-Application
is	O
obsolete	O
and	O
only	O
used	O
by	O
legacy	O
code	O
.	O
</s>
<s>
Ubuntu	O
10.04	O
shipped	O
without	O
HAL	B-Application
.	O
</s>
<s>
Initially	O
a	O
new	O
daemon	B-Operating_System
DeviceKit	O
was	O
planned	O
to	O
replace	O
certain	O
aspects	O
of	O
HAL	B-Application
,	O
but	O
in	O
March	O
2009	O
,	O
DeviceKit	O
was	O
deprecated	O
in	O
favor	O
of	O
adding	O
the	O
same	O
code	O
to	O
udev	B-Application
as	O
a	O
package	O
:	O
udev-extras	O
,	O
and	O
some	O
functions	O
have	O
now	O
moved	O
to	O
udev	B-Application
proper	O
.	O
</s>
<s>
udev	B-Application
was	O
introduced	O
in	O
Linux	B-Application
2.5	I-Application
.	O
</s>
<s>
The	O
Linux	B-Operating_System
kernel	I-Operating_System
version	O
2.6.13	O
introduced	O
or	O
updated	O
a	O
new	O
version	O
of	O
the	O
uevent	O
interface	O
.	O
</s>
<s>
A	O
system	O
using	O
a	O
new	O
version	O
of	O
udev	B-Application
will	O
not	O
boot	O
with	O
kernels	B-Operating_System
older	O
than	O
2.6.13	O
unless	O
udev	B-Application
is	O
disabled	O
and	O
a	O
traditional	O
directory	O
is	O
used	O
for	O
device	O
access	O
.	O
</s>
<s>
In	O
April	O
2012	O
,	O
udev	B-Application
's	O
codebase	B-General_Concept
was	O
merged	O
into	O
the	O
systemd	B-Application
source	O
tree	O
,	O
making	O
systemd	B-Application
183	O
the	O
first	O
version	O
to	O
include	O
udev	B-Application
.	O
</s>
<s>
In	O
October	O
2012	O
,	O
Linus	O
Torvalds	O
criticized	O
Kay	O
Sievers	O
's	O
approach	O
to	O
udev	B-Application
maintenance	O
and	O
bug	O
fixing	O
related	O
to	O
firmware	B-Application
loading	O
,	O
stating	O
:	O
</s>
<s>
In	O
2012	O
,	O
the	O
Gentoo	B-Application
Linux	I-Application
project	O
created	O
a	O
fork	B-Application
of	O
systemd	B-Application
's	O
udev	B-Application
codebase	B-General_Concept
in	O
order	O
to	O
avoid	O
dependency	O
on	O
the	O
systemd	B-Application
architecture	O
.	O
</s>
<s>
The	O
resulting	O
fork	B-Application
is	O
called	O
eudev	O
and	O
it	O
makes	O
udev	B-Application
functionality	O
available	O
without	O
systemd	B-Application
.	O
</s>
<s>
A	O
stated	O
goal	O
of	O
the	O
project	O
is	O
to	O
keep	O
eudev	O
independent	O
of	O
any	O
Linux	B-Application
distribution	I-Application
or	O
init	B-Operating_System
system	O
.	O
</s>
<s>
The	O
Gentoo	B-Application
project	O
describes	O
eudev	O
as	O
follows	O
:	O
</s>
<s>
On	O
May	O
29	O
,	O
2014	O
,	O
support	O
for	O
firmware	B-Application
loading	O
through	O
udev	B-Application
was	O
dropped	O
from	O
systemd	B-Application
,	O
as	O
it	O
has	O
been	O
decided	O
that	O
it	O
is	O
the	O
kernel	B-Operating_System
's	O
task	O
to	O
load	O
firmware	B-Application
.	O
</s>
<s>
Two	O
days	O
later	O
,	O
Lennart	O
Poettering	O
suggested	O
this	O
patch	O
be	O
postponed	O
until	O
kdbus	O
starts	O
to	O
be	O
utilized	O
by	O
udev	B-Application
;	O
at	O
that	O
point	O
,	O
the	O
plan	O
was	O
to	O
switch	O
udev	B-Application
to	O
use	O
kdbus	O
as	O
the	O
underlying	O
messaging	B-Operating_System
system	I-Operating_System
,	O
and	O
to	O
get	O
rid	O
of	O
the	O
userspace-to-userspace	O
netlink-based	O
transport	O
.	O
</s>
<s>
udev	B-Application
was	O
developed	O
by	O
Greg	O
Kroah-Hartman	O
and	O
Kay	O
Sievers	O
,	O
with	O
much	O
help	O
from	O
Dan	O
Stekloff	O
,	O
among	O
others	O
.	O
</s>
