0
Kubuntu Static IP Script
I wrote a very small script to set static IPs on a kubuntu box.
#!/bin/bash if [ $# -lt 4 ] then echo "Usage: $0 <interface> <ip> <netmask> <gateway> <dns1>" exit fi ifconfig $1 $2 netmask $3 echo "Static IP set" route add default gw $4 echo "Routes added" if [ "$5" != "" ] then echo "nameserver $5" >>/etc/resolv.conf fi echo "DNS set"