How to use the 'vi' or 'nano' text editors at Sailfish Terminal

Jolla Care -

There are two options for an editor to be run at the Sailfish Terminal app.

Note that you would often need the superuser rights ("root rights") to be able to save the file after editing it (in case of configuration files typically). Hence, you should get those rights with command devel-su first (see



1. nano

Text editor 'nano' may be easier for a beginner than VI but the choice is yours.

Nano can be installed via

devel-su pkcon install nano

Launch the editor with (choose the file you want to edit):

nano file.txt

Nano appears as a layer on the Sailfish Terminal. There is a toolbar at the bottom of the display.

The instructions in this link explain how-to-use-nano. For example:

  • Saving the text in the buffer to a file is called “writing out” and is triggered by hitting Ctrl+O. You’ll be prompted for a filename to use.

  • When you want to quit Nano, you just hit Ctrl+X. Nano will politely ask you if you want to save your buffer, and you can cancel this action as well.


2. vi

This editor is ready for use in Sailfish Terminal. If you are not familiar with using the vi editor the brief instructions below should help you.


Launch the editor with (choose the file you want to edit):

vi file.txt


The instructions in this link explain how-to-use-vi. For example:

  • Tap "i" to enter the insert mode
  • Move the cursor to the appropriate point with the arrow keys
  • Type in the changes needed - be careful not to make any unintended changes while moving the cursor
  • Tap "Esc" to exit the insert mode
  • Type ":wq" and tap "Enter" to save the changes and exit the editor, or
    type just ":q" and tap "Enter" to exit the editor without saving any changes.
Have more questions? Submit a request
Powered by Zendesk