dev_change_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dev_change_name(9) β€” the Kernel API Manual page you didn't know you needed ✨

okay so picture this: you're deep in kernel land, it's 2am, and you just need to rename a network device. that's it. that's the whole page. it's dev_change_name(9) from the Kernel API Manual and honestly? she's short, she's sweet, she's giving "one job and she does it." πŸŽ€


🌸 NAME 🌸

dev_change_name β€” change name of a device πŸ’«

like literally just... changing a name. that's the vibe. no cap.


✨ SYNOPSIS ✨

int dev_change_name (struct net_device *dev , const char *newname );

look at her. two args. clean. iconique. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device. like, the actual device you're renaming. bestie, you gotta tell her which one. 🫢
  • newname β€” the name (or format string), and heads up: it must be at least IFNAMSIZ. don't come in with a tiny string, she will Not be having it. πŸ’€

πŸ’– DESCRIPTION πŸ’–

so you wanna change the name of a device? say less. this does exactly that. πŸ”₯

and here's the little extra sprinkle on top: you can pass format strings like "ethd" for wildcarding. the way that just... lets you pattern-match a name. iykyk. ✨


🌈 RETURN 🌈

  • 0 on success β€” slay, we ate, no crumbs. πŸŽ‰
  • -errno on failure β€” ngl, that's the "it didn't work, go check your errno" situation. 😭

🧚 SEE ALSO 🧚

the kernel file ./net/core/dev_api.c and honestly her whole friend group:

main character energy across the board. go read them. obsessed. πŸ’œ


and that's the whole page bestie β€” no hidden lore, no secret options, no plot twists. just a rename function living her truth. πŸ¦‹

mwah πŸ’‹ that's a wrap from ./net/core β€” October 2026 edition, filed under dev_change_name(9). go rename something iconic, ily, bye! πŸŽ€βœ¨

πŸ“¦ where this page comes from