How to check whether dhcp is enabled or not in ubuntu 12.04? Is there any command for that
1 Answer
If you're looking for command line only, you can check for the presents of the dhclient
process, using the ps
command
ps ax | grep dhclient
In 12.04 the network configuration should be written out to /etc/network/interfaces
so you can check that file for lines similar to:
auto eth0
iface eth0 inet dhcp
The Ubuntu documentation on networking may help you out too.
-
This checks whether the service is running, not whether it is enabled. May 8, 2017 at 15:14