Configure a command line IP address in Linux
We are working on the linux ifconfig command
1. Set your IP address
the ip address is the logical address to identify your machine on the local network
root @ easytuto: ~ # ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up
2. Set your default gateway:
the default gateway is the address of the nearest network machine (example router)
root @ easytuto: ~ # route add default gw 192.168.1.1
3. Define your DNS server
with DNS server you can connect to the internet
the address for the dns server is the address of your gateway or ip address of google 8.8.8.8
root @ easytuto: ~ # echo “nameserver 8.8.8.8”> /etc/resolv.conf
Test by pinging google.com
root @ easytuto: ~ # ping google.com
Pingback: Configurer une adresse IP via la ligne de commande sous Linux • EasyTutoFr