Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a perfectly happy Debian Wheezy 7.4 install that sets up eth0 as DHCP. But as I want to set a static IP address for it, I navigate to /etc/network and open up the interfaces file and see the entire contents:

auto lo
iface lo inet loopback

But .. but .. but where is eth0 being configured?

Using the graphical system tools I can set a static IP, but I'd prefer to do this via the command line. But where do I do this?

share|improve this question
    
@Qasim You should make that an answer and not a comment to my question –  Peter M Apr 11 at 12:26
    
sorry i have my answer now. –  Qasim Apr 11 at 12:32
add comment

1 Answer 1

up vote 1 down vote accepted

You can set the ip in /etc/network/interfaces. It's not showing because it seems that you are using network-manager.

My /etc/network/interfaces

cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

It's because I am also using network-manager. You can also check the following link for network settings.

How to set static ip in debian

Note : Settings in /etc/network/interfaces will bypass network-manager.

share|improve this answer
    
I didn't know I was using Network Manager. Thanks for that. –  Peter M Apr 11 at 12:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.