dev_set_alias(9)
β¨ dev_set_alias(9) β¨
okay so bestie, welcome to the Kernel API Manual β this one's dev_set_alias, and it's genuinely such a little cutie. tiny function, one job, does it well. let's get into it π
π NAME π
dev_set_alias β changes the ifalias of a device
π¦ SYNOPSIS π¦
int dev_set_alias (struct net_device *dev , const char *alias , size_t
len );
like, look at that signature. three args, returns an int, no drama. icon behavior fr π
πΈ ARGUMENTS πΈ
devβ the device. the whole point. the main character of this operation πaliasβ the name you want, and it can be up toIFALIASZlong. that's the cap, respect the cap πlenβ the limit of bytes to copy from info. so it's not copying everything in sight, justlenbytes max. boundaries, we love to see it β¨
β DESCRIPTION β
it sets ifalias for a device. that's it. that's the whole vibe. no cap, it just does the one thing and slays while doing it π«Ά
π RETURN π
0on success β we love a win π-errnoon failure β yeah the sad path, it comes back negative with an errno value π
π SEE ALSO π
highkey the whole kernel file ./net/core/dev_api.c is part of this squad, so let's give the siblings their shoutout:
dev_change_name(9)dev_change_flags(9)dev_set_group(9)dev_change_net_namespace(9)dev_change_carrier(9)dev_change_tx_queue_len(9)dev_change_proto_down(9)dev_open(9)dev_close(9)dev_disable_lro(9)dev_set_promiscuity(9)dev_set_allmulti(9)dev_set_mac_address(9)netdev_state_change(9)
go read them too, they're literally all right there π§
π reminder:aliasonly has room forIFALIASZcharacters, andlenis the byte limit for the copy β so don't come in thinking you can drop a whole novel in there.
aaand that's the page bestie! this one lives in ./net/core and it's dated October 2026 β shoutout to the Kernel API Manual for hosting it. mwah ππβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms