How should I use nano as my new text editor?

Asked 4 weeks ago (Feb 10, 2021) in the field of Operating Systems by Sam

Working with Vi is a little difficult for me, I wish to start using nano but how could I use it and change my text editor in Ubuntu/Debian? Is it possible to change it permanently, please? Thank you and waiting for your reply.


Answered 4 weeks ago (Feb 10, 2021) by Eldernode Staff

First, install the nano using the following command:

yum -y install nano

You can now use the following command to temporarily change the default text editor:

export EDITOR="nano"

To change the text editor in Debian and Ubuntu systems, you can perform the following command:

sudo update-alternatives --config editor

To change the text editor permanently and systematically, first go to etc/profile.d:

cd /etc/profile.d

Then open the custom.sh file for editing:

nano custom.sh

Add and save the following code:

export EDITOR="nano"
export VISUAL="nano"

Finally, reboot the server:


For more information, see How to install and use nano text editor and How to work with Nano Editor in Linux.

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way


7 days a week, 24 hours a day