A convenient tool to get my IP information
To install:
git clone git@github.com:Bank-Builder/myip.git
sudo cp myip/myip /usr/bin/myip
sudo chmod +x /usr/bin/myip
rm -rf myip/Now whenever you need that IP info you are always looking for, use the myip command:
Default (shows only UP interfaces):
~$ myip
-----------------------------------------
NETWORK INFORMATION ver 1.5
-----------------------------------------
IP Addresses: 192.168.101.106/24 10.8.0.2/24
Network Adapter: enp2s0
Wildcard Masks: 192.168.101.255 10.8.0.255
Gateway: 192.168.101.1
Public IP: 164.92.180.239
Active DNS: 1.1.1.1
-----------------------------------------
ROUTING & INTERFACE INFORMATION
-----------------------------------------
Interface Summary: Active: 3, VPN: 1
Interface Table:
INTERFACE TYPE STATE IP ADDRESS
------------------ ------------ ------ -------------------------
enp2s0 Physical UP 192.168.101.106/24
lxdbr0 Bridge UP 10.100.215.1/24
catnip VPN UP 10.8.0.2/24
Default Route:
default via 192.168.101.1 dev enp2s0 proto dhcp src 192.168.101.106 metric 100
Active Routes:
default via 192.168.101.1 dev enp2s0 proto dhcp src 192.168.101.106 metric 100
-----------------------------------------
Show all interfaces (including DOWN):
~$ myip --all
[Shows all interfaces including DOWN ones]Disable colors:
~$ myip --no-color
[Shows output without colors]Help:
~$ myip --help
Usage: myip [--all] [--no-color]
--all Show all interfaces including DOWN interfaces
--no-color Disable color output
-h, --help Show this help messageNote: A wildcard mask is the invert of a subnet mask.
See Wikipedia Wildcard Mask
License: MIT
Copyright (c) 2020 bank-builder