CentOS comes with nano but if it became uninstalled or not working then you can install it by following the article till end.
First login on centOS as a root user.
Now check that nano is installed or not by running the given command in CentOS 7 command line interface.
# nano –version
If you see this picture, then its mean that nano is not installed else you have to remove it and reinstalled it correctly.
1. Uninstall nano.
# yum remove -y nano
2. Install nano.
# yum install -y nano
After that check the nano --version again.
# nano –version
Now it will show you this screen.
How to Install nano on Almalinux
How to Install vim on Almalinux