Ubuntu 24: open a file from terminal with the default text editor

Execute the following command from terminal:

/bin/gnome-text-editor .bashrc