Linux Shell Script set fixed IP

rafaone - Sep 17 '22 - - Dev Community

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

ifconfig eth0 down;             
ifconfig eth0 141.1.89.151  netmask  255.255.128.0 up;
route add default gw 141.1.47.142  eth0;

Enter fullscreen mode Exit fullscreen mode

eth0: the interface of ethernetcard

. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player