DEV Community

Rafael Gimenes Leite
Rafael Gimenes Leite

Posted on

Linux Shell Script set fixed IP

Simple shell script to up the ethernet card on specific IP.

ifconfig eth0 down;             
ifconfig eth0  netmask up;
route add default gw  eth0;

Enter fullscreen mode Exit fullscreen mode

eth0: the interface of ethernetcard

Top comments (0)