3 ms·
If you have qrencode on your system, you can also print a QR code with echo "http://$(ip route get 1 | sed -n 's/.*src \([0-9.]\+\).*/\1/p'):8082" | qrenco
by creata 4y ago
If you have qrencode on your system, you can also print a QR code with
echo "http://$(ip route get 1 | sed -n 's/.*src \([0-9.]\+\).*/\1/p'):8082" | qrencode -t UTF8 -o -
Credit to https://stackoverflow.com/a/49552792 https://stackoverflow.com/a/49552792 for fetching the IP address.
- BeefWellington 4y agoI find hostname -I Generally simpler and works in the 90% case.