The command hostnamectl
, when executed with no argument, will dump a bunch of information to the terminal. One of that is the Operating System
line as shown in the sample output below:
$ hostnamectl
Static hostname: xxxxxx
Icon name: computer-laptop
Chassis: laptop
Machine ID: e8..43
Boot ID: 7b..2a
Operating System: Ubuntu 21.10
Kernel: Linux 5.13.0-28-generic
Architecture: x86-64
Hardware Vendor: XXXXXX
Hardware Model: XXXXXX
However, the output "Ubuntu 21.10
" is underlined like a hyperlink and when you Ctrl+click, it will open a web browser with the following link address: https://ubuntu.com/
.
How is this accomplished? What are the terminal commands (escape sequences?) that I need to output from a text based program or script to create such a hyperlink on the terminal?