How do I create a new file and edit it as root?
17,190
My version of gedit (2.22.3) does create the file if it doesn't exist. If yours doesn't, you can create the file first with sudo touch /etc/xinetd.d/tftp
.
I recommend using sudoedit /etc/xinetd.d/tftp
instead. This uses your favorite editor, taken from the EDITOR
environment variable, or a system default if you haven't expressed your preference. Add export EDITOR=/usr/bin/gedit
to your ~/.profile
if necessary.
See also How do I run a command as the system administrator (root).
Author by
Shira
Updated on September 17, 2022Comments
-
Shira over 1 year
I've tried:
gksudo gedit /etc/xinetd.d/tftp
(this is the path I need). I got an error message:couldn't find the file /etc/xinetd.d/tftp please check that you typed the location correctly and try again
What do I need to do?