New answers tagged

0

For devices are managed by Network Manager can use the utility nmcli nmcli dev list iface eth0 | grep IP4-SETTINGS.GATEWAY: | awk '{ print $2}' For ppp0 in my case it's 0.0.0.0


0

For the ppp0 device you can query the IP address of the peer with ip addr show ppp0. However, you don’t even need one, as for a point-to-point device like ppp0 you can simply set the route only to the interface, omitting the router IP.


0

As @Alex mention netstat -r, if that's not available there is also another way: $ ip route list dev eno1 default via X.X.X.X proto static metric 100 X.X.X.X/24 proto kernel scope link src X.X.X.X metric 100 $ replace eno1 with your device. dhclient -R routers - I can't test it, as I don't have dhcp set-up anywhere.


0

This command will give you all the routes set in your Linux machine, including gateway: route -n


2

Any user can execute ifconfig. The problem is that usually you want ifconfig to be executed with root permissions, so that you can temporarily change your system configuration. Changing the group of the binary (and having to play with setuid) is not the way to do this. Execute visudo and add the line %if ALL=(ALL) /sbin/ifconfig to the end of the file. ...


-1

ifconfig is deprecated. See this article for more information. The modern equivalent of ifconfig on its own is ip address list


0

I think you should add the option net.ifnames=0 kernel command in file isolinux.cfg, the option will set your network interface to ifcfg-ethX intead of ifcfg-enX. network --device eth0 --bootproto dhcp --ipv6 xxxxx::10/64 --gateway xxxxx:1 --nameserver --hostname foo.example.com



Top 50 recent answers are included