ifconfig - how to determine if IP address is static or dhcp?

In Windows an ipconfig /all shows a field that says DHCP Enabled = Yes/No
Is there a comparable linux command to determine if the IP address was assigned via DHCP or Static?  Also, is there a way to have ifconfig display its information one screen at a time?

Who is Participating?
grantsewellConnect With a Mentor Commented:
By the command line, the only way to determine if an IP address is static or dynamically assigned is by viewing / editing the networking file (ex. in Ubuntu / Debian, /etc/network/interfaces).

ifconfig | more will limit the display of the information to the size of the current window, and allow you to progressively display the remainder of the data.


DoasliConnect With a Mentor Commented:
ipconfig /all in Windows does show whether it's enabled or not.
not sure about Linux, however, I think the command to display one screen at a time is ifconfig | more

Hope that works for you.
No, it does not tell you, you have to look in the configs, what is your distribution? redhat, debian, ubuntu?
Hatrix76Connect With a Mentor Commented:
another way to look at it is if a:

ps afux | more

does not reveal a dhcp-client process you are pretty sure that you are not dhcp configured, but the best way is to check the configs

dkrautAuthor Commented:
thanks all, it's RHEL btw.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.