Newbie: how to edit a file from the command line

in file commands, newbie, ubuntu server

Could there be any more basic question? We all know there are no stupid questions, but I sure felt dumb having to look up this one.

I found the built in editor nano. Likely more searching will yield a better editor. But for now nano will work.

For other newbies, note that you need to use run nano through sudo (super user do) if you intend to update any system files. For example, to edit the CUPS config file

sudo nano /etc/cups/cupsd.conf

Also, if changing config files, make a copy first. Again, you will need to use sudo for any restricted files.

eg: sudo cp cupsd.conf cupsd.conf.bkup_orig

Comments on this entry are closed.

{ 1 trackback }

Previous post:

Next post: