ubuntu bring up all interface and show actual speed
#!/bin/bash
# Get a list of all network interfaces
interfaces=($(ifconfig -a | awk '/^[a-zA-Z]/{print $1}' | grep -v '^lo$'))
# Loop through the array and bring each interface up
for interface in "${interfaces[@]}"; do
# Remove trailing colon from interface name
interface=$(echo "$interface" | sed 's/:$//')
echo "Bringing up interface: $interface"
sudo ifconfig $interface up
ethtool $interface | grep "Speed:" | awk '{print $2}'
done