AI has lastly began to trickle into the Linux command line. Because of the likes of Ollama, this actuality is not avoidable: it is right here, and it isn’t going anyplace. That is to not say you have to make use of AI in your Linux terminal, however you can. For many who profit from AI and infrequently use the Linux Command Line Interface (CLI), the mixture of the 2 could be a very highly effective productiveness increase.
Sure, you may get the ability of Gemini AI instantly in your Linux terminal.
Gemini CLI is a domestically put in device that can be utilized for a variety of duties, equivalent to content material era, downside fixing, deep analysis, and even activity administration. Though the unique focus of Gemini CLI was on builders, it may also be utilized by finish customers who need to entry AI with out having to make use of an online browser or a third-party GUI.
The issue with Gemini CLI is that it’s kind of tough to put in. Luckily, I am right here that will help you with that.
Easy methods to set up Gemini CLI on Ubuntu
What you may want: The one stuff you’ll want are a operating occasion of Ubuntu Linux (or a distribution based mostly on Ubuntu), a person with sudo privileges, and a working Google account. Be sure you’ve already signed in to your Google account along with your default net browser earlier than operating Gemini CLI for the primary time.
The very first thing to do is open your default terminal window app.
Present extra
Subsequent, we’ll set up Node.js (as a result of Gemini CLI is put in with the Node.js package deal supervisor, npm). To put in Node.js, challenge the command:
Present extra
sudo apt-get set up nodejs -y
Now, we will set up NPM with the command:
Present extra
sudo apt-get set up npm -y
I’ve come throughout a number of items of documentation that instruct the way to set up Gemini CLI with npm, however lots of them wind up with the gemini command not discovered. The one positive solution to set up Gemini CLI correctly is with the command:
Present extra
sudo npm set up -g @google/gemini-cli
When that finishes, you are able to run Gemini.
Be aware: In the event you get an error when attempting to run Gemini, you might need to put in the newest model of Node.js, which could be performed with the next instructions:
curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
sudo -E bash nodesource_setup.sh
sudo apt-get set up nodejs -y
After operating the above, you may need to reinstall npm with:
sudo apt-get set up npm -y
Gemini first run steps
1. Run Gemini
The very first thing you need to do is run Gemini with the command:
gemini
2. Choose your theme
Gemini will immediate you to pick a theme. Since this can be a curses-based software, use your arrow keys to pick the theme you need, then hit Enter in your keyboard.
3. Choose your authentication methodology
You learn that proper: it’s a must to log in along with your Google account. There are different methods to authenticate (Gemini API Key or Vertex AI), however utilizing your Google account is the simplest methodology. Ensure that “Login with Google” is chosen, then hit Enter in your keyboard.
4. Authenticate
Whenever you hit Enter in your keyboard, your default net browser will open, the place you possibly can choose the Google account you need to use. As soon as you have authenticated, the terminal window will change to a Gemini immediate, the place you possibly can kind your first question.
And that’s how you put in the Gemini CLI device on Linux. Benefit from the energy of AI in your terminal.
Get the morning’s high tales in your inbox every day with our Tech As we speak publication.





