How to Install the Gemini CLI on Ubuntu by Upgrading Node.js
I installed the Gemini CLI because I want to ask an AI questions without leaving my terminal. The installation requires Node.js v20 or newer, so I chose to install version 22, as it is the latest Long-Term Support (LTS) release, ensuring stability. Since the Node.js version in Ubuntu’s official repository is older, I had to add a new repository to install it. Here are the detailed steps I took to get it working: 1. Remove the old Node.js version First, you need to remove the outdated Node.js package that was installed from Ubuntu’s default repositories. Running sudo apt autoremove afterward is also a good idea to clean up any leftover … Read more