Ubuntu Shell - get your IP Address , Subnet Mask and Gateway 28 March 2021 Don-Rickman (0) hostname -I ifconfig if net-tools are installed. If not, install them. sudo apt install net-tools ip a Gateway IP and Subnet ip r Destination and Mask route netstat -r -n External IP Address: curl https://ipinfo.io/ip