The question pretty much says it all. I opened emacs as a regular user and am trying to edit something in the /etc/ folder (I know this is dangerous etc. etc.)
How can I do this?
You could use https://stackoverflow.com/questions/95631/open-a-file-with-su-sudo-inside-emacs, for example C-x C-f /sudo::/path/to/file
There is packages that gives some utilities functions for this:
sudo-edit
for opening buffers as rootdired-toggle-sudo
for switching from current user to sudo when browsind dired buffers.Also see the Edit file with super-user rights question.