Introduction

In this article we will show you how to install vim, emacs and nano on Debian and Redhat based Linux distributions.

Redhat based distributions include:

  • Centos
  • Redhat Enterprise Linux
  • Fedora

Debian based distributions include;

  • Ubuntu
  • Debian

For each editor we will show you the necessary step(s) to install it for each distribution base. For Redhat we will be using yum and for Debian base we will be using apt-get.

Vim

For Redhat based systems use yum install vim to install it.

Vim is generally installed by default on Ubuntu distributions but if it isn’t you can use apt-get install vim to install it.

Emacs

For Redhat based systems use yum install emacs to install Emacs.

For Debian (Ubuntu) based systems use apt-get install emacs to install Emacs

Nano

For Redhat based systems use yum install nano to install Nano.

Nano is generally installed by default on Ubuntu based distributions but if it isn’t you can use apt-get install nano to install it.

A quick intro to each editor.

Nano

To edit a file: nano filename.txt
To save a file: CTRL + o.
To quit the editor: CTRL + x

Vim

To edit a file: vim filename.txt
To enter edit mode: i
To exit edit mode: esc
To save a file: :w
To quit the editor :q
To save and quit: :wq

Emacs

To edit a file: emacs filename.txt
To save a file: CTRL + x then CTRL + s
To quit the editor CTRL + x then CTRL + c