unregister_netdev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… unregister_netdev β€” Kernel API Manual, section 9 πŸŽ€

okay bestie, yes, this is unregister_netdev from the Kernel API Manual (section 9, the kernel-API girlies) and it's literally the "bye bitch" button for network devices. let's get into it πŸ’–


✨ NAME ✨

unregister_netdev β€” remove device from the kernel 🫢

like, the whole ass device. gone. from the kernel. no cap.


🌸 SYNOPSIS 🌸

void unregister_netdev (struct net_device *dev );

that's it. that's the whole vibe. returns nothing (void) and takes exactly one thing πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” device πŸŽ€ (yes, that's the entire description in the original, and honestly? iconic minimalism. it's the struct net_device * you wanna yeet out of the kernel tables)

⭐ DESCRIPTION ⭐

so what does it actually do, you ask? two things, and they are both main character energy:

This function shuts down a device interface and removes it from the kernel tables. πŸ’€βœ¨ that's the whole job. interface down, tables cleaned, done.

and here's the tea, bestie β€” this is just a wrapper for unregister_netdevice that takes the rtnl semaphore. so it's unregister_netdevice but it handles the rtnl locking for you 🧚

fr fr: in general you want to use this and not unregister_netdevice. like, that's the actual advice. use unregister_netdev, not the raw one. the manpage said it, i'm just relaying it with feeling 😭

🌈 SEE ALSO 🌈

okay this list is long long, but every single one is here because we do NOT skip entries in this house πŸ‘‘ source file is ./net/core/dev.c and the whole extended family is:

iykyk πŸ§šβ€β™€οΈ


and that's the page, bestie 🫢 it lives in ./net/core and this edition is dated October 2026, titled unregister_netdev(9) β€” go shut down some interfaces responsibly, mwah πŸ’‹πŸ’œ

πŸ“¦ where this page comes from