MyD


Server world

  • OpenSSH
  • Useful commands
  • DEBIAN: Network configuration

Software build

  • SPACK: 1-Install and configure
  • StarLink 2021A: Installation on Fedora 35
Astroparticle physics suite
  • StarLink 2021A: Installation on Fedora 35
  • Home
  • Docs
  • Server world
  • Useful commands

Useful commands

Extract network interface name and/or ip:

ip -o -4 addr list
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
2: eno1    inet 192.168.8.200/24 brd 192.168.8.255 scope global noprefixroute eno1\       valid_lft forever preferred_lft forever
ip -o -4 addr list | cut -d/ -f1 | awk '{print $2":"$4}' | grep -v lo
# Extract network interface name for ex. WAN
WAN_IF=$(/sbin/ip -o -4 addr list | grep -v secondary | grep 129.241 | cut -d/ -f1 | awk '{print $2}' | head -n 1)
# To exclude multiple items for ex. only primary interfaces, public ip addresses and the loopback interface
LAN_IF=$(/sbin/ip -o -4 addr list | egrep -v -w 'secondary|129.241|lo' | cut -d/ -f1 | awk '{print $2}')

OpenSSHDEBIAN: Network configuration

MyD is proudly powered by WordPress