Installation and First Launch
This lesson covers installing Neovim, verifying the version, and completing your first editing session with the essential survival commands.
Leave this lesson with Neovim installed, version 0.9+ confirmed, and enough survival skills to open, edit, save, and quit a file.
Installation
- Debian/Ubuntu
- RHEL/Fedora/AlmaLinux
- Arch Linux
- macOS
- AppImage (Universal)
# From system packages (may be older version)
sudo apt update
sudo apt install -y neovim
nvim --version
# For latest stable — use AppImage
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/nvim
nvim --version
# Fedora
sudo dnf install -y neovim python3-neovim
nvim --version
# RHEL/AlmaLinux — use AppImage (package version is often outdated)
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/nvim
sudo pacman -S neovim
nvim --version
brew install neovim
nvim --version
# Latest stable release — works on any x86_64 Linux
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/nvim
nvim --version
This track requires Neovim 0.9+. Many features (LSP, Treesitter, lazy.nvim) require 0.9 or newer. Run nvim --version to confirm.
Verify Installation
nvim --version
Expected:
NVIM v0.10.4
Build type: Release
LuaJIT 2.1.0-beta3
...
Configuration Directory
Neovim loads config from:
# Primary config directory
~/.config/nvim/
# Main config file
~/.config/nvim/init.lua (Lua — preferred)
# or
~/.config/nvim/init.vim (Vimscript — legacy)
# Create the config directory
mkdir -p ~/.config/nvim
# Confirm nvim knows where to look
nvim --headless -c "echo stdpath('config')" -c "quit"
Survival Commands — Your First Session
Open a file:
nvim myfile.txt
The Four Commands You Must Know
| What to do | Keys |
|---|---|
| Enter Insert mode (start typing) | i |
| Return to Normal mode | Esc |
| Save the file | :w then Enter |
| Quit | :q then Enter |
| Save and quit | :wq then Enter |
| Quit without saving (force) | :q! then Enter |
Step-by-Step First Session
1. Open a file: nvim test.txt
2. Look at bottom left: -- NORMAL --
3. Press i: -- INSERT -- (now you can type)
4. Type: Hello Neovim
5. Press Esc: -- NORMAL --
6. Type: :w (command line appears at bottom)
7. Press Enter: File saved
8. Type: :q
9. Press Enter: Neovim exits
Getting Help Inside Neovim
Neovim has an excellent built-in help system:
:help → Open general help
:help i → Help for Insert mode
:help motion → Help for motions
:help :write → Help for the :write command
:help 'number' → Help for the number option
Navigate help with:
Ctrl+] → Follow help tag (link)
Ctrl+o → Go back
:q → Close help window
Checking Health
Neovim includes a health-check tool:
nvim --headless -c "checkhealth" -c "quit"
# or inside nvim:
:checkhealth
This shows which dependencies are installed/missing and what providers are available.
The nvim Alias
Most experienced users alias nvim to vim for convenience:
alias vim="nvim"
alias vi="nvim"
Common First-Launch Pitfalls
| Pitfall | Symptom | Fix |
|---|---|---|
| Typing in Normal mode | Weird characters or commands | Press Esc → :q! → start again |
| Can't save | "E212: Can't open file" | Check directory permissions |
| Old version (< 0.9) | Plugins fail to load | Install via AppImage (see above) |
| "NVIM" vs "nvim" | Wrong binary | Run which nvim to verify |
Immediate Next Step
Run the built-in tutorial:
:Tutor
This is Neovim's interactive tutorial that takes ~30 minutes and teaches all survival commands. Do this before anything else.