Use any editor you like. That is a personal choice. vim, nano, ted, are a few. You probably want nano. There must be 50 different editors, but without a GUI, the number drops to the text-only editors.
In recovery mode or using bootable media, you have to get the correct storage/partition/file system mounted somewhere, then determine the directory, then edit the file. The file may not already exist, so you'll create it new as part of the editing. I spent more time typing that than it would take to actually do it, once I knew the mounted location of the directory.
There are many things that Windows-trained people assume which don't apply for any other OS made. Unlearning that stuff is a challenge.
Sadly, Unix skills build on prior skills, so jumping into something is likely beyond current skills. There's all sorts of knowledge necessary to accomplish this task that are not intuitively obvious. Most people new to Linux should probably just do a fresh install. That's 10 minutes of time and you are done. Then restore any files from your backups made before the problem started. If you still need to modify the ~/.xprofile, use nano ~/.xprofile.
Running sudo with GUI commands can break things. Best to avoid it completely for now.
Learn basic Linux skills: http://linuxcommand.org/tlcl.php
In Unix, there isn't 1-way to accomplish things. There are usually 50, 500, 50,000 ways. Which one is best depends on things only you know. I get that people want to know "what to type", but we can only say, "it depends on things we don't know." If I assume the device name and get it wrong, bad things. Really bad things. It can be frustrating for you, but it is also frustrating for us.
Bookmarks