
Follow ZDNET: Add america arsenic a preferred source connected Google.
ZDNET's cardinal takeaways
- Gemini CLI brings Gemini AI straight to nan Linux terminal.
- Setup requires Node.js and npm, but installation is straightforward.
- You tin tally queries, code, and negociate tasks without a browser.
AI has yet started to trickle into nan Linux bid line. Thanks to nan likes of Ollama, this reality is nary longer avoidable: it's here, and it's not going anywhere. That's not to opportunity you have to usage AI successful your Linux terminal, but you can. For those who use from AI and often usage nan Linux command-line interface (CLI), nan operation of nan 2 tin beryllium a very powerful productivity boost.
Yes, you tin get nan powerfulness of Gemini AI straight successful your Linux terminal.
Also: Gemini vs. Copilot: I tested nan AI devices connected 7 mundane tasks, and it wasn't moreover close
Gemini CLI is simply a locally installed instrumentality that tin beryllium utilized for a wide scope of tasks, specified arsenic contented generation, problem-solving, heavy research, and moreover task management. Although nan original attraction of Gemini CLI was connected developers, it tin besides beryllium utilized by extremity users who want to entree AI without having to usage a web browser aliases a third-party GUI.
The problem pinch Gemini CLI is that it's a spot tricky to install. Fortunately, I'm present to thief you pinch that.
What makes Gemini CLI a game-changer?
One of nan reasons why Gemini is simply a game-changer is that it's nan first command-line-driven AI instrumentality that tin activity pinch different types of information, specified arsenic text, images, audio, video, and more. On apical of that, it's nan first instrumentality that brings nan powerfulness of Gemini to nan bid line, while besides having entree to commands connected your Linux system.
Also: Gemini conscionable aced nan world's astir elite coding title - what it intends for AGI
Because of that, you will surely want to usage Gemini CLI pinch caution. You wouldn't want to springiness it entree to delicate information, which is why I'll show really to usage it wrong a circumstantial directory.
Gemini besides includes built-in devices for Google Search grounding, record operations, ammunition commands, web fetching, and more. It besides supports civilization integrations.
The free tier of Gemini CLI gives you 60 requests per minute, and 1,000 requests per time (using your individual Google account).
How to instal Gemini CLI connected Ubuntu
What you'll need: The only things you'll request are a moving lawsuit of Ubuntu Linux (or a distribution based connected Ubuntu), a personification pinch sudo privileges, and a moving Google account. Make judge you've already signed successful to your Google relationship pinch your default web browser earlier moving Gemini CLI for nan first time.
Next, we're going to instal Node.js (because Gemini CLI is installed pinch nan Node.js package manager, npm). To instal Node.js, rumor nan command:
Show more
sudo apt-get instal nodejs -y
Now, we tin instal npm pinch nan command:
Show more
sudo apt-get instal npm -y
I've travel crossed respective pieces of archiving that instruct really to instal Gemini CLI pinch npm, but galore of them upwind up pinch nan gemini bid not found. The only judge measurement to instal Gemini CLI decently is pinch nan command:
Show more
sudo npm instal -g @google/gemini-cli
When that finishes, you're fresh to tally Gemini.
Also: The champion free AI for coding successful 2025 - only 3 make nan trim now
Note: If you get an correction erstwhile trying to tally Gemini, you mightiness person to instal nan latest type of Node.js, which tin beryllium done pinch nan 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 nan above, you'll person to reinstall npm with:
sudo apt-get instal npm -y
Gemini first tally steps
1. Run Gemini
The first point you must do is tally Gemini pinch nan command:
gemini
2. Select your taxable
Gemini will punctual you to prime a theme. Since this is simply a curses-based application, usage your arrow keys to prime nan taxable you want, past deed Enter connected your keyboard.
Also: Google's caller Jules Tools is very cool - really I'm utilizing it and different Gemini AI CLIs
You tin prime from immoderate 1 of nan included themes.
3. Select your authentication method
You publication that right: you person to log successful pinch your Google account. There are different ways to authenticate (Gemini API Key aliases Vertex AI), but utilizing your Google relationship is nan easiest method. Make judge "Login pinch Google" is selected, past deed Enter connected your keyboard.
Also: My 8 must-use Linux commands, and really they tin make your life easier
I would urge utilizing nan Google Authentication method, arsenic it's nan easiest.
4. Authenticate
When you deed Enter connected your keyboard, your default web browser will open, wherever you tin prime nan Google relationship you want to use. Once you've authenticated, nan terminal model will alteration to a Gemini prompt, wherever you tin type your first query.
Also: 7 Linux commands I can't unrecorded without aft 20 years successful nan terminal
You are now fresh to tally your first query.
Using nan Gemini bid statement instrumentality
Now that nan Gemini CLI has been installed, let's find retired really to usage it.
Also: The first 8 Linux commands each caller personification should learn
This is really rather simple. You should first create a circumstantial directory for your caller project, specified as:
mkdir ~/GEMINI
Change into that directory with:
cd ~/GEMINI
Now, tally Gemini pinch nan command:
gemini
You could besides instruct Gemini to usage a circumstantial LLM. For example, since I'm going to inquire it a programming question, I mightiness want to usage nan qwen3-coder model. Instruct Gemini to usage nan exemplary pinch nan command:
gemini -m qwen3-coder
Now, you tin type a modular query. I'll show pinch nan following:
Show maine really to constitute a Python module
You mightiness announcement that Gemini tin get a spot snarky arsenic it runs your query. For instance, during my query it wrote out:
Rickrolling my boss.
Depending connected your query, Gemini will require entree to circumstantial commands aliases petition that you use changes. This happened respective times during my trial query (about Python modules). As Gemini did its thing, it printed retired step-by-step instructions connected really to constitute a Python module.
Also: 10 Linux tips I springiness to some beginners and professionals for improved productivity
Depending connected your query, Gemini mightiness require permissions to tally commands.
When nan query was completed, I recovered nan illustration Python module successful nan ~/GEMINI folder, which included nan module Gemini created arsenic an example. Gemini besides printed retired a summary connected what it did to create nan Python module sample I requested.
Gemini completed nan task and now it's clip for maine to study something.
When you're done utilizing Gemini, deed Ctrl+C doubly to exit.
And that is really you instal and usage nan Gemini CLI instrumentality connected Linux. Enjoy nan powerfulness of AI successful your terminal.
5 days ago
English (US) ·
Indonesian (ID) ·