Find Out HP Network Printer Serial Number with Bash Shell On Linux/Unix

Originally published at: https://www.cyberciti.biz/faq/linux-unix-howto-find-out-hp-printer-serial-number-command/

I manage a small network including couple of HP printers. Is there an easy way to access HP printer serial number in the terminal on Linux or Unix-like system? How do I find the model, product, and serial number on my HP printer using bash command line options?