Skip to content

Instantly share code, notes, and snippets.

@creachadair
Created December 3, 2024 22:32
Show Gist options
  • Save creachadair/2c0522485d0fe7307de7bf79daae828f to your computer and use it in GitHub Desktop.
Save creachadair/2c0522485d0fe7307de7bf79daae828f to your computer and use it in GitHub Desktop.
Port numbering mnemonics

Mnemonics for port numbers

Although this convention is quite old, I only learned of it fairly recently. One way to pick a "memorable" port number is to use a telephone-style encoding of the digits to their corresponding letters on a (QWERTY) keyboard. So, just as one might spell 364-9255 as "DOG-WALK", you can do the same trick with the keyboard letters.

In tabular format, that is:

1  2  3  4  5  6  7  8  9  0
Q  W  E  R  T  Y  U  I  O  P
A  S  D  F  G  H  J  K  L  ?
Z  X  C  V  B  N  M

By this convention, if you need a port for something called "wacky monitoring service" you might abbreviate this as WAMS and map it to port 2172.

This is really too opaque to expect anyone to decipher it after the fact, but it does at least give a way to document the value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment