Reading the earlier posts, I followed the posted replies. Since I am brand new, I opted to use the Ubuntu GUI, from which I entered the Terminal. At the terminal, I entered nano /etc/network/interfaces. at the line AUTO enp4s0 and IFACE enp4s0 INET DHCP, I changed it to read:

auto eth0
iface eth0 inet static
network <---I guessed at this from a earlier post
dns <---this too was a guess 

**note that the two lines marked as guesses were added because two posts had them, while others did not.

I then entered CTRL+X to exit. Was prompted if I wanted to save. Entered Y for yes. Return message was

ERROR WRITING /etc/netwrk/interfaces: Permission denied.

Any assistance to get a static IP assigned would be appreciated.


First, you cannot simply rename your interfaces to eth0 if your system is using enp4s0. I suggest that you do:

 sudo nano /etc/network/interfaces

Set up the file something like this:

auto enp4s0
iface enp4s0 inet static

I suggest a static address of x.107 as it is unlikely to conflict with the range of addresses used by the DHCP server in your router. The network address may safely be omitted, and therefor not subject to guesswork. Lastly, it is dns-nameservers and not dns.

Restart the interface:

sudo ifdown enp4s0 && sudo ifup enp4s0


ping -c3
ping -c3 www.ubuntu.com

If you get ping returns, you are all set.

  • Thank you. Your explanation is exactly what I hoped for.
    – ckawahara
    Mar 29 '16 at 16:23

for your main question :

yes use sudo before the command you want to grant root privileges.

for your second question :

in newer version of linux we use a more precise and constant naming convention for pci cards called "Predictable network interface device names".

so for your network card you got "enp4s0" which means :

en - Ethernet

p - Port number 4

s - pci slot number on the motherboard 0.

more prefixs for general knowledge :

  • Two character prefixes based on the type of interface:
    • en -- Ethernet
    • sl -- serial line IP (slip)
    • wl -- wlan
    • ww -- wwan

taken from : link

P.S - if you really want you can change your interfaces name back to eth0 , quick google : AskUbuntuLink

  • Thank you. I did a Google, but apparently used the incorrect search terms.
    – ckawahara
    Mar 29 '16 at 16:24

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