Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just want to set to default /etc/network/interfaces but I can't because I get a Permission denied error when I try to write to it:

auto lo  
iface lo inet loopback
share|improve this question

migrated from Oct 5 '12 at 13:46

This question came from our site for professional and enthusiast programmers.

URL to a video is a bad idea. People should be able to see the entire question right here on StackOverflow. Plus, what if the video gets deleted tomorrow? Consider editing your question to include the actual problem. – ArjunShankar Oct 4 '12 at 9:52

In Ubuntu or Linux in general, files inside root / is owned by root. A user would therefore need root privileges to access those files.

Since you're trying to write to /etc/network/interfaces file, you do need to be root or have root privileges. To do so, use the sudo command which is used to perform file operations on files that the Root User would only be allowed to change.

Open a terminal with Ctrl+Alt+T and run:

sudo gedit /etc/network/interfaces

This will open Gedit, you can then make the necessary changes to the file.

Note: Since Gedit is a graphical application, it is recommended to run sudo graphically with gksu. Therefore, you can also do it this way:

gksu gedit /etc/network/interfaces
share|improve this answer

try using sudo or edit as root

share|improve this answer

You must log in to answer this question.