Linux - How to edit a file?

About

To edit a file in the shell mode, you have to use an editor such as:

For a Windows gui, Winscp has its own editor.

Snippet

To edit the file:

  emacs file.txt
  vi file.txt
  pico file.txt

To save the file:

  • with pico type CTRL+O to save and CTRL+X to exit.
  • with vi, see this article: Text Editor - Vi (VIM)
  • with emacs: Ctl-x Ctl-c

Powered by ComboStrap