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

  • 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
    Commented Nov 30, 2020 at 15:35

2 Answers 2


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.


If you use Visual Studio Code, the remote-ssh extension is your best best friend.
Disclaimer - This starts a vscode server on the RPi and takes up significant memory. I have had issues when using this setup to build a website using Vite+React+TS and running a flask server simultaneously.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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