RHEL CentOS set default editor to NANO

VI is a wonderful, full feature text editor. However, some might lack experience with VI and prefer a simpler text editor for quick configuration and other edits.
Install nano


yum -y install nano

System Default Editor


cat <<EOF >>/etc/profile.d/nano.sh
export VISUAL="nano"
export EDITOR="nano"
EOF

User Default Editor


cat <<EOF >>~/.bash_profile
export VISUAL="nano"
export EDITOR="nano"
EOF

Leave a Reply

Your email address will not be published.