Use basic text editing commands (vi, nano, or emacs) to create and modify files.

Context: GNU/Linux command examples.

Use basic text editing commands (vi, nano, or emacs) to create and modify files.

Certainly! Here are examples of GNU/Linux commands for basic text editing using popular editors: vi, nano, and emacs.

  1. Using vi:

    • Create a new file or open an existing file with vi:
      vi filename
    • Press i to enter the insert mode and start editing the file.
    • Save the changes and exit vi by pressing Esc followed by :wq and then Enter.
  2. Using nano:

    • Create a new file or open an existing file with nano:
      nano filename
    • Start editing the file. Use the arrow keys to navigate and type your text.
    • Save the changes by pressing Ctrl + O and then press Enter.
    • Exit nano by pressing Ctrl + X.
  3. Using emacs:

    • Create a new file or open an existing file with emacs:
      emacs filename
    • Start editing the file. Type your text.
    • Save the changes by pressing Ctrl + X followed by Ctrl + S.
    • Exit emacs by pressing Ctrl + X followed by Ctrl + C.

These commands allow you to create and modify files using different text editors in GNU/Linux. Choose the editor that you are most comfortable with or learn the basics of multiple editors to suit your preferences.

You should also read:

Docker commands

List all docker containers (running and stopped) docker ps --all docker run --name container_name image docker start|stop container_name docker pull image docker images…