AI has yet started to trickle into the Linux bid line. Thanks to the likes of Ollama, this world is nary longer avoidable: it's here, and it's not going anywhere. That's not to accidental you have to usage AI successful your Linux terminal, but you can. For those who payment from AI and often usage the Linux Command Line Interface (CLI), the operation of the 2 tin beryllium a precise almighty productivity boost.
Yes, you tin get the powerfulness of Gemini AI straight successful your Linux terminal.
Also: My 2 favourite AI apps connected Linux - and however I usage them to get much done
Gemini CLI is simply a locally installed instrumentality that tin beryllium utilized for a wide scope of tasks, specified arsenic contented generation, occupation solving, heavy research, and adjacent task management. Although the archetypal absorption of Gemini CLI was connected developers, it tin besides beryllium utilized by extremity users who privation to entree AI without having to usage a web browser oregon a third-party GUI.
The occupation with Gemini CLI is that it's a spot tricky to install. Fortunately, I'm present to assistance you with that.
How to instal Gemini CLI connected Ubuntu
What you'll need: The lone things you'll request are a moving lawsuit of Ubuntu Linux (or a organisation based connected Ubuntu), a idiosyncratic with sudo privileges, and a moving Google account. Make definite you've already signed successful to your Google relationship with your default web browser earlier moving Gemini CLI for the archetypal time.
Next, we're going to instal Node.js (because Gemini CLI is installed with the Node.js bundle manager, npm). To instal Node.js, contented the command:
sudo apt-get instal nodejs -y
Now, we tin instal NPM with the command:
sudo apt-get instal npm -y
I've travel crossed respective pieces of documentation that instruct however to instal Gemini CLI with npm, but galore of them upwind up with the gemini bid not found. The lone definite mode to instal Gemini CLI decently is with the command:
sudo npm instal -g @google/gemini-cli
When that finishes, you're acceptable to tally Gemini.
Note: If you get an mistake erstwhile trying to tally Gemini, you mightiness person to instal the latest mentation of Node.js, which tin beryllium done with the pursuing commands:
curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
sudo -E bash nodesource_setup.sh
sudo apt-get instal nodejs -y
After moving the above, you'll person to reinstall npm with:
sudo apt-get instal npm -y
Gemini archetypal tally steps
1. Run Gemini
The archetypal happening you indispensable bash is tally Gemini with the command:
gemini
2. Select your taxable
Gemini volition punctual you to prime a theme. Since this is simply a curses-based application, usage your arrow keys to prime the taxable you want, past deed Enter connected your keyboard.
Also: How I provender my files to a section AI for better, much applicable responses
You tin prime from immoderate 1 of the included themes.
3. Select your authentication method
You work that right: you person to log successful with your Google account. There are different ways to authenticate (Gemini API Key oregon Vertex AI), but utilizing your Google relationship is the easiest method. Make definite "Login with Google" is selected, past deed Enter connected your keyboard.
Also: Here's however I yet cracked a tricky Linux occupation with this AI terminal app
I would urge utilizing the Google Authentication method, arsenic it's the easiest.
4. Authenticate
When you deed Enter connected your keyboard, your default web browser volition open, wherever you tin prime the Google relationship you privation to use. Once you've authenticated, the terminal model volition alteration to a Gemini prompt, wherever you tin benignant your archetypal query.
Also: The archetypal 5 Linux commands each caller idiosyncratic should learn
You are present acceptable to tally your archetypal query.
And that is however you instal the Gemini CLI instrumentality connected Linux. Enjoy the powerfulness of AI successful your terminal.
Also: How to tally DeepSeek AI locally to support your privateness - 2 casual ways
Get the morning's apical stories successful your inbox each time with our Tech Today newsletter.