NETPLUGD(8)
π netplugd β the network cable hotplug management daemon π
okay so bestie, welcome to the netplugd(8) manual, it's a System Manager's Manual situation and honestly? iconic. let's get into it.
β¨ NAME β¨
netplugd β network cable hotplug management daemon
π SYNOPSIS π
netplugd [-FP] [-c config_file] [-i interface_pattern] [-p pid_file]
π¦ DESCRIPTION π¦
so netplugd is a daemon (yes, a daemon, very main character) that responds to network link events coming from the Linux kernel β like when a network interface loses or acquires a carrier signal. lowkey vital.
when an Ethernet-style network interface on a host gets plugged into a powered-up switch, hub, or another host, the two of them use a carrier signal to establish that the link is alive. the Linux kernel makes this info available through its netlink(7) interface. periodt.
the netplugd daemon listens for carrier detection and loss messages from the kernel's netlink(7) subsystem. when a carrier signal is detected on an interface, it runs a script to bring the interface up. when carrier is lost, netplugd runs a script to bring the interface down. netplugd does not define any policies for how to manage interfaces β it leaves that whole vibe to a script, /etc/netplugd/netplug, which is described in "FILES" below. π
you tell netplugd which interfaces it should manage by giving it a list of shell-style glob patterns, which it matches against using the fnmatch(3) function. for example, a pattern of eth[13] will tell netplugd to only manage eth1 and eth3, if those interfaces exist. and if the interfaces aren't known to the kernel at the time you start netplugd β maybe because they're unplugged PCMCIA network interfaces, or devices whose drivers haven't been installed yet β netplugd will start to manage them as soon as they're plugged in or their drivers become available. no cap, it just waits. π«Ά
π OPTIONS π
-Fβ run in the foreground; do not detach and run as a daemon. messages are logged tostdoutorstderrinstead of using thesyslog(3)mechanism. this option is useful mainly for debugging your configuration. π-Pβ prevent autoprobing for interfaces. thenetplugddaemon normally probes for all possible interface names that might match the patterns you tell it to manage. this is necessary in order to get network driver modules (the default with almost all Linux distributions) loaded and set up, so they can provide link status notifications to thenetplugddaemon. autoprobing should always be safe, and doesn't take long. disable it with caution. β οΈ-cconfig_fileβ specify the name of a file from which to read patterns that describe the interfaces to manage. you can provide this option multiple times to read from more than one file. if you don't provide this option at all,netplugdwill attempt to read from a default config file. and if you do not wantnetplugdto try to read from any real config files, you can specify/dev/nullas a config file. sneaky but valid. π-iinterface_patternβ specify a pattern that will be used to match interface names thatnetplugdshould manage. you can provide this option multiple times to specify multiple patterns.-ppid_fileβ write the daemon's process ID to the filepid_file. if you tellnetplugdto run in the foreground, this option is ignored. π
πΈ FILES πΈ
/etc/netplug.d/netplugd.confβ default config file to read, if none is specified on the command line. the config file format is one pattern per line, with white space, empty lines, and comments starting with a#character ignored. patterns are standard shell-style glob patterns, e.g."eth[0-9]". β¨/etc/netplug.d/netplugβ the "policy" program (typically a shell script) thatnetplugduses to probe for interfaces, and to bring them up or down in response to network link events. this program is called with the name of the interface as its first argument, and one of the following options:inβ a cable was plugged in, or carrier came up. the command should bring the interface up. the command is run asynchronously, and it should exit with status0on success. πoutβ a cable was plugged out, or carrier went down. the command should bring the interface down. the command is run asynchronously, and it should exit with status0on success. πͺ«probeβ the command should load and initialise the driver for this interface, if possible, and bring the interface into the "up" state, so that it can generatenetlink(7)events. the command is run synchronously; it must exit with status code0if it succeeds, otherwise with a non-zero exit code or signal. π
π AUTHOR π
netplugd was written by Bryan O'Sullivan <bos@serpentine.com>. king behavior honestly.
π COPYRIGHT AND LICENSE π
Copyright 2003 PathScale, Inc. Copyright 2003, 2004, 2005 Bryan O'Sullivan
netplugd is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. you are forbidden from redistributing or modifying it under the terms of any other license, including other versions of the GNU General Public License. like, read that again bestie. π«
netplugd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License for more details.
β SEE ALSO β
cardmgr(5), hotplug(8), ip(8), netlink(7)
and that's the whole page, bestie β this one's from the Linux 2.6 era, dated August 26, 2003. old but still serving. π β¨π
π¦ where this page comes from
- fedora 43: netplug 1.2.9.2-30.fc43 Β· GPL-2.0-only
- fedora 44: netplug 1.2.9.2-31.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms