You are not logged in.
Pages: 1
Topic closed
Hi everyone, I'm trying to edit my conf files but I can't save them unless I'm the root.How do you open/edit a file as root? I've searched in the forums for thread for this but couldn't find any.
Last edited by ConfuseACat (2013-03-22 22:22:56)
Offline
Open the file as the root user. If you have the "sudo" command installed
sudo <your editor of choice> <file you are trying to edit>
Otherwise, you'll have to log in as the root user and open the file from there.
Offline
C'mon... You could of easily found this on Google.
sudo nano <file>
I'm just assuming nano would be easier for you. You could use vim. gedit, or whatever other editor you want.
I have wasted atleast a second of your time by making you read my signature.
Offline
Open the file as the root user. If you have the "sudo" command installed
sudo <your editor of choice> <file you are trying to edit>
Otherwise, you'll have to log in as the root user and open the file from there.
I managed to open it in root with leafpad and save it.Thanks
Offline
C'mon... You could of easily found this on Google.
sudo nano <file>
I'm just assuming nano would be easier for you. You could use vim. gedit, or whatever other editor you want.
I'm not really sure why but when I tried to open it in nano it gave me a completely different file instead of the one I was trying to open with Leafpad.
Offline
$ sudoedit /etc/myconf.cfg
man sudo and look for the -e option (they're synonyms).
If you're using a GUI, then see also the askpass stuff in the same man page. Might be how gksudo works, don't know as don't have it.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
I think the real problem is those of us who use arch have a paradigm that is not applicable to Archbang.
Closed.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Pages: 1
Topic closed