1

I am using the Raspbian Lite image for the first time and realize there isn't any text editor. I am also using SSH to bring up the remote Raspberry Pi terminal on a LAN from a Windows 10 laptop.

How can I edit files with a text editor on Raspbian Lite? Can I do this through an SSH connection to a remote Raspberry Pi on a LAN?

This also helped me on Nano

1
  • On an easy/simple to complex/difficult scale, at the former end you have things like nano, on the latter vim and emacs which have IDE like features. I'd guess any of the non-DOS centric things listed here are available: en.wikipedia.org/wiki/List_of_text_editors#Text_user_interface If you'd rather use something you are familiar with on the Windows box you can probably remote mount the/a filesystem on the Pi. – goldilocks Nov 30 '20 at 15:35
9

The simplest way would be to use nano. It comes as standard on the majority of Linux distributions. To use it, simply type nano followed by the name/path to the file you want to edit.

For example, to create and edit a new file called test, type

nano test

To edit an existing file, such as fstab, type

nano /etc/fstab

Or navigate into the etc directory (cd /etc) and type

nano fstab

Note some files will require root privileges to edit so you'll need to use sudo to edit. Be careful with those as that's where you may cause problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.