How to Change the Default Text Editor on Linux
Easily change your Linux Text Editor to your preferred editor at any time.
Usually, your system has different editors pre-installed in the base system. Your default text editor depends on the Linux distro you're using. It may be Nano, Vim, Emacs, etc. Changing your default editor is entirely up to you, it depends on the features you want and the type of interface and keyboard shortcuts you seek.
Editors are at times task-specific and you may have to shuffle them depending on your tasks. This guide will teach you how to change the default text editor on your Linux operating system.
How to change the default text editor on Linux
Step 1: Be sure of your Shell configuration as this ensures you're using the right config file. To do this, run:
echo $SHELL
This will show your current shell on the screen, either;
/bin/bash
-> It means you're using Bash/bin/zsh
-> It means you're using Zsh
You'll be running the corresponding config file of your shell, so take note of the table below.
Shell Config file Bash ~/.bashrc Zsh ~/.zshrc