Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com 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

2 Answers 2

try using sudo or edit as root

share|improve this answer

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

Your Answer

 
discard

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