Ubuntu Forums Archive Viewer

Editing root files

Archived thread 100731 from Absolute Beginner Talk. Markdown source: Absolute_Beginner_Talk/thread_100731_Editing_root_files.md

Original URL About this archive
#1

Is there a way to edit files owned by root by using sudo?

#2

Yes, that's the purpose of sudo. Check here for more info:

https://wiki.ubuntu.com/RootSudo

Chris.

#3

There are two ways to edit a file with root privileges:

Open a terminal window and type sudo gedit nameoffile

This will open the file in a text editor and allow you to save the file when your editing is complete.

The second method is to use the Open as a different user utility under Applications > System Tools and enter Nautilus. This will allow you to navigate to the file using Nautilus, open, edit and save the file.

Hope this is helpful

#4

Thanks. All I had done with sudo is attempt to install XMMS.

#5

There are two ways to edit a file with root privileges:

Open a terminal window and type sudo gedit nameoffile

Hope this is helpful Thats what I was looking for :D Thanks!

#6

You may be interested in this trick.

#7

Actually, I saw this thismorning and im planning on trying it when I get home!