By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
IT Infras HolicIT Infras HolicIT Infras Holic
  • News
  • Linux
    • Application
    • SELinux
    • Centos
    • Ubuntu
  • Docker
  • Web Server
    • Kong
    • Nginx
    • Openlitespeed
  • Database
  • Mikrotik
  • Windows
  • Mail
  • Tools
    • 2048
    • Fantasy Forest
    • Hextris
    • Crossword
Search
  • Privacy Policy
© 2024. All Rights Reserved.
Font ResizerAa
IT Infras HolicIT Infras Holic
Font ResizerAa
  • News
  • Linux
  • Docker
  • Web Server
  • Database
  • Mikrotik
  • Windows
  • Mail
  • Tools
Search
  • News
  • Linux
    • Application
    • SELinux
    • Centos
    • Ubuntu
  • Docker
  • Web Server
    • Kong
    • Nginx
    • Openlitespeed
  • Database
  • Mikrotik
  • Windows
  • Mail
  • Tools
    • 2048
    • Fantasy Forest
    • Hextris
    • Crossword
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
IT Infras Holic > Blog > Linux > How to Set Nano as Default Editor in CentOS 7
Linux

How to Set Nano as Default Editor in CentOS 7

writer
Share
2 Min Read
SHARE

Nano as Default Editor in CentOS 7

Not everyone is familiar with the “vim” text editor. Its many shortcuts are also not easy to memorize. One of the most commonly used text editors is nano, but in the CentOS 7 standard installation, nano is not yet a standard text editor. Therefore, follow the steps below to make nano as a standard text editor, so that it will be easier for us to do editing, for example, to edit crontab

Contents
Nano as Default Editor in CentOS 7Install nanoDisable Word WrapSet System Default EditorSet Per User DefaultTry

Install nano

Execute command below to install nano

1
yum -y install nano

Disable Word Wrap

Nano by default enables word wrap. While nice in a normal document, this is generally undesirable in a configuration file

1
echo "set nowrap" >>/etc/nanorc

Let's continue steps to set Nano as Default Editor in CentOS 7

Set System Default Editor

During login, a number of scripts are run to setup the environment. In CentOS, a file for each subject is used. These are stored in a system profile directory, /etc/profile.d/. There are two environment variables that control which editor to use.

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

Set Per User Default

If a user wishes to set the default editor for themselves, it can be, instead, be done in the user's bash profile.

1
2
3
4
cat <>~/.bash_profile
export VISUAL="nano"
export EDITOR="nano"
EOF

Check if you have set Nano as Default Editor in CentOS 7

Try

Try by opening crontab. execute commnad below

1
crontab -e

If it opened in nano, so, those steps is right..Try to logout and then login again if still fail

Thats is steps to Set Nano as Default Editor on CentOS 7

You Might Also Like

Monitoring File & Directory Changes using Bash Script

Vulnerability Checker CVE-2024-3094

Unleashing the Potential of Knowledge Management with Wiki.js

How to Install Apache Guacamole with Docker Compose

Unlocking Seamless Remote Access: Exploring the Power of Apache Guacamole

TAGGED: default editor, editor, nano
Share This Article
Facebook Twitter Whatsapp Whatsapp LinkedIn Telegram Copy Link
Previous Article install mysql percona 8 in centos 7 How to Install MySQL Percona 8 in CentOS 7
Next Article Enable DNS over HTTPS on Mikrotik Enable DNS over HTTPS on Mikrotik (DoH on Mikrotik)
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest News

bash
Monitoring File & Directory Changes using Bash Script
Linux Application
vulnerability
Vulnerability Checker CVE-2024-3094
Linux
wiki.js
Unleashing the Potential of Knowledge Management with Wiki.js
Application Linux
Install Apache Guacamole
How to Install Apache Guacamole with Docker Compose
Application Linux

You Might also Like

How to Install Cyberpanel on Ubuntu 22.04
OpenlitespeedUbuntuWeb Server

Install Cyberpanel on Ubuntu 22.04

8 Min Read
How to map SFTP as a drive on Windows 10
LinuxWindows

How to map SFTP as a drive on Windows 10

3 Min Read
Follow US
© 2024
activity notes activity notes
Welcome Back!

Sign in to your account

Lost your password?