--- gitea: none include_toc: true --- # Linux Netzwerk ## Interface Jedes Interface hat einen eigenen Namen welches konfiguriert werden muss - `en*`: Physisches Ethernet Interface - `wl*`: Physisches WLAN Interface - `ww*`: Physiche WWAN Interace (Cellphone Card, Network Address) - `eth*`: Virtuelles Interface (VMs, Cloud Instanzen) - `vir*`: VirtualBox `route` shows used Interface. ## Get hostname ``` hostname ``` ## Get public IP address IPv4: ``` dig TXT +short o-o.myaddr.l.google.com @ns1.google.com or host myip.opendns.com resolver1.opendns.com ``` IPv6: ``` dig -6 TXT +short o-o.myaddr.l.google.com @ns1.google.com ``` ## Network configuration with nmcli ### Show available wifi ``` nmcli device wifi list ``` ### show network interfaces on computer ``` ip link show or nmcli device ``` ### show interface information Shows table with local IP, Gateway IP, DNS IP, network name etc. ``` nmcli con show NAME UUID TYPE DEVICE RR_Net 9a0bf331-2197-478e-aaef-8bdb0da7daef wifi wlp1s0 ``` ``` nmcli dev show ``` For hardware info: ``` lshw -C network ```