How to edit text files in qubes

Original forum link
https://forum.qubes-os.org/t/38841
Original poster
Solène R
Created at
2026-01-24 17:48:05
Last wiki edit
2026-01-25 11:52:58
Revisions
1 revision
Posts count
13
Likes count
16

When following guides, it is often asked to edit files, most often in template but sometimes in qubes themselves.

This is a guide that explain on a template by template basis, how to edit a file. The audience are beginners who do not know how to edit files from a terminal or very little experience with Linux.

Graphical text editor

debian-13 or fedora-43 based templates / qubes (not xfce!)

Now you can start the editor in that qube from the Qubes OS menu. In the Text Editor program, click on the top left button "Open", then click on the "Icon" in the small popup and browse the file system to find the file you want to edit. If you need to create a new file, write the content then save to the location you want.

Note that if you edit a file that should be edited as root (the admin user), Text Editor will automatically escalate privileges to have the permissions to edit the file, this is possible without password because qubes do not have a root password by default.

You can start the program from the terminal using gnome-text-editor and you can add a parameter to it for a file location if you want. This does not work if you add sudo to this command.

debian-13-xfce or fedora-43-xfce or fedora-42-xfce based templates / qubes

Now you can start the editor in that qube from the Qubes OS menu. In the program Mousepad, click on the menu "File", then click on "Open" browse the file system to find the file you want to edit. If you need to create a new file, write the content then save to the location you want.

Note that if you edit a file that should be edited as root (the admin user), you need to start Mousepad from the terminal to run it as root:

Command line

If you are not afraid of typing commands in a terminal to edit a file, here is what you need to look for. It is a valuable skill to know how to use a terminal text editor.

All Qubes OS templates

All templates in Qubes OS feature two editors by default: nano and vi. You might want to do an internet search to figure how to use them, as they have no buttons to click to achieve actions, nor they have the usual shortcuts (like ctrl+s to save):

Some links to get started: