well it depends what editor you want to use ... i will use "vim" in my example ..
so your now at a root prompt you can type :
(thats the location on my box)
and basically just use your arrow keys when you get inside the file to move around or press :
and type a "keyword" to let vim find an occurance of it in real time, to get to a location quicker ..
then when you get to the part you want to edit you type :
to go into "insert mode" for that you can edit the contents ... and when your done editing you hit :
which gets you outta insert mode, and then you will save and quit the file by either of the following :
these are just a couple of the basics to edit a file using vim, and there are many many more options .... you can sort through a search engine to find some docs that you like or for now you can look at :
vim simple commands
a vim tutorial
list of tutorials within the acutal HOWTO