<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rwonly</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rwonly"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Rwonly"/>
	<updated>2026-05-03T09:35:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Mdev&amp;diff=26616</id>
		<title>Mdev</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Mdev&amp;diff=26616"/>
		<updated>2024-03-27T04:05:13Z</updated>

		<summary type="html">&lt;p&gt;Rwonly: apk doesn&amp;#039;t have &amp;#039;install&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:mdev}}&lt;br /&gt;
mdev is the default [[Device_Manager|device manager]] on Alpine Linux. It is provided by busybox as alternative to [https://man.archlinux.org/man/udev.7 systemd&#039;s udev].&lt;br /&gt;
mdev is &#039;&#039;&#039;not&#039;&#039;&#039; a drop in replacement for udev. See [[eudev]] for that instead. mdev lacks some features which makes it not recommended for a full blown desktop enviroment.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The easy way to setup mdev is throught the [[#Setup_Script|setup script]]. For custom installation see the [[#Manually|manually section]]. Note that a manual installation is only recommended for advanced users.&lt;br /&gt;
&lt;br /&gt;
=== Setup Script ===&lt;br /&gt;
&lt;br /&gt;
The {{pkg|alpine-conf}} package privides [https://git.alpinelinux.org/alpine-conf/tree/setup-devd.in setup-devd] to easily install and setup device managers.&lt;br /&gt;
&lt;br /&gt;
Install {{pkg|alpine-conf}} if it is not already installed.&lt;br /&gt;
{{cmd|# apk add {{pkg|alpine-conf}}}}&lt;br /&gt;
Setup mdev.&lt;br /&gt;
{{cmd|# setup-devd mdev}}&lt;br /&gt;
&lt;br /&gt;
=== Manually ===&lt;br /&gt;
&lt;br /&gt;
Mdev is provided by the {{pkg|busybox}} package which is pre installed on any alpine installation. To run mdev the [[OpenRC]] init scripts are required too. If it isn&#039;t already installed install it:&lt;br /&gt;
{{cmd|# apk add {{pkg|busybox-mdev-openrc}}}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you already have a device manager installed you need to stop it before you start mdev.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enable the mdev service.&lt;br /&gt;
{{cmd|# rc-update add mdev sysinit}}&lt;br /&gt;
{{cmd|# rc-update add hwdrivers sysinit}}&lt;br /&gt;
If you are not running in a chroot you will also want to start mdev.&lt;br /&gt;
{{cmd|# rc-service mdev start}}&lt;br /&gt;
{{cmd|# rc-service hwdrivers start}}&lt;br /&gt;
&lt;br /&gt;
You might also want to take a look at [[#libudev replacement|libudev replacement]] if programms you want to use depend on udev.&lt;br /&gt;
&lt;br /&gt;
== Remove ==&lt;br /&gt;
&lt;br /&gt;
{{warning|Disabling mdev without setting up a different device manager may cause unexpected issues. If you install a different device manager with the setup script this step is not needed.}}&lt;br /&gt;
&lt;br /&gt;
First stop the service. This step can be skipped when you are running in a chroot.&lt;br /&gt;
{{cmd|# rc-service mdev stop}}&lt;br /&gt;
Then disable it.&lt;br /&gt;
{{cmd|# rc-update delete mdev sysinit}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You might also want to uninstall the init scripts since they are not used anymore.&lt;br /&gt;
{{cmd|# apk del {{pkg|busybox-mdev-openrc}}}}&lt;br /&gt;
The mdev binary is part of the {{pkg|busybox}} package and therefor can&#039;t be uninstalled.&lt;br /&gt;
&lt;br /&gt;
== libudev replacement ==&lt;br /&gt;
&lt;br /&gt;
{{pkg|libudev-zero}} provides udev apis but is independent from the device manager used. When installed it will make &#039;&#039;&#039;some&#039;&#039;&#039; udev reliant programms work with mdev. See &amp;lt;code&amp;gt;[https://github.com/illiliti/libudev-zero/#what-doesnt-work What doesn&#039;t work]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
=== Custom network interfaces ===&lt;br /&gt;
See [[Custom network interface names]]&lt;br /&gt;
&lt;br /&gt;
=== USB Printer ===&lt;br /&gt;
See [[Printer_Setup#configure_mdev_for_USB_printers|configure mdev for USB printers]]&lt;br /&gt;
&lt;br /&gt;
=== Raspberry Pi Bluetooth Speaker ===&lt;br /&gt;
See [[Raspberry_Pi_Bluetooth_Speaker#Bluetooth|Raspberry Pi Bluetooth Speaker]]&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[:Category:Device_Manager|Device Managers]]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Mdev Gentoo wiki Mdev]&lt;br /&gt;
* [https://git.busybox.net/busybox/plain/docs/mdev.txt mdev doc]&lt;br /&gt;
* [https://github.com/slashbeast/mdev-like-a-boss mdev like a boss]&lt;br /&gt;
&lt;br /&gt;
[[Category:Device_Manager]]&lt;/div&gt;</summary>
		<author><name>Rwonly</name></author>
	</entry>
</feed>