Skip to content

Instantly share code, notes, and snippets.

@ThinGuy
Created October 3, 2022 19:20
Show Gist options
  • Save ThinGuy/29f199be0f66c4b6590be7e243810ab9 to your computer and use it in GitHub Desktop.
Save ThinGuy/29f199be0f66c4b6590be7e243810ab9 to your computer and use it in GitHub Desktop.
REGEX for Predictable Network Interface Device Names
export PNID_REGEX=$(curl -fksSL https://raw.githubusercontent.com/systemd/systemd/main/src/udev/udev-builtin-net_id.c|grep -oPa '(?<=prefix = \x22)[^\x22]+'|sort -uV|paste -sd'|'|sed -r 's,l\|ww,[lw],g;s,^|$,\x27')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment