Question: ifconfig how to set ip address?
Answer: Set Your IP Address. ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up. Set Your Default Gateway. route add default gw 192.168.1.1. Set Your DNS Server. Yes, 1.1. 1.1 is a real DNS resolver by CloudFlare. echo "nameserver 1.1.1.1" > /etc/resolv.conf.