Raspberry Pi OS Lite Wi-Fi Configuration (Advanced)

How to Edit a File in Vim

  1. First, open a file by typing vim filename in your terminal. Replace "filename" with the name of your file. If the file does not exist, vim will create a new one with the given name.
    vim my_file.txt
  2. Now, you’re in Vim’s default mode, which is Command mode. To start editing the file, you need to switch to Insert mode. You can do this by pressing the i key on your keyboard.
  3. Once in Insert mode, type and following code which is used to setup the Wi-Fi via the command line.
  4. When you’re done editing, you need to go back to Command mode. Press the Esc key to return to this mode.
  5. In Command mode, you can save the file and quit Vim with the command :wq (short for write and quit) and press Enter. This will save any changes and quit the editor.
    :wq
  6. The file is now saved! Congrats, you’ve edited a file in Vim.
Co funded by the EU

Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Education and Culture Executive Agency (EACEA). Neither the European Union nor EACEA can be held responsible for them.

Project Number: 2023-3-CY02-KA210-YOU-000173087