{"id":16891,"date":"2024-10-26T23:24:14","date_gmt":"2024-10-26T21:24:14","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=16891"},"modified":"2024-10-26T23:24:38","modified_gmt":"2024-10-26T21:24:38","slug":"google-gemini-auf-dem-linux-terminal","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2024\/10\/26\/google-gemini-auf-dem-linux-terminal\/","title":{"rendered":"Google Gemini auf dem Linux-Terminal"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">KI &#8211; also k\u00fcnstliche Intelligenz ist so eine Geschichte. Ich selbst bezeichne solche Software nicht wirklich als k\u00fcnstliche Intelligenz, mehr als gut belesene Datenbank. Wenn man Fragen richtig stellt, kann es vorkommen, dass man auch mal eine passende Antwort bekommt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wenn ich KI wirklich mal brauche, nutze ich selbst Google Gemini (<em>ehemals Bard<\/em>). Liefert &#8211; wie schon beschrieben, wenn man die Fragen richtig stellt auch mal passende Antworten. Gemini k\u00f6nnen wir nat\u00fcrlich auch am Terminal unter Linux nutzen.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Gemini unter Linux installieren<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Als Erstes ben\u00f6tigen wir einen API-Key, diesen bekommen wir kostenlos unter <a href=\"https:\/\/makersuite.google.com\/app\/apikey\" target=\"_blank\" rel=\"noreferrer noopener\">Google AI Studio<\/a>. Links oben klicken wir auf den Schalter &#8222;<strong>Get API Key<\/strong>&#8222;, wir klicken uns durch, bis uns der Schl\u00fcssel pr\u00e4sentiert wird. Diesen kopieren wir.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Haben wir den Key, installieren wir Gemini als normaler Benutzer \u00fcber den <a href=\"https:\/\/linux-bibel.at\/index.php\/2024\/02\/24\/go-software-von-github-unter-linux-installieren\/\" data-type=\"post\" data-id=\"14309\">Go Repository Manager<\/a>. Also, als normaler Benutzer am Terminal:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>go install github.com\/reugn\/gemini-cli\/cmd\/gemini@latest<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Haben wir das Go-Verzeichnis noch nicht in unsere Shell-Konfiguration eingetragen, f\u00fcgen wir dieses in diese ein (<em>also etwa in die <strong>.bashrc<\/strong> oder in die <strong>.zshrc<\/strong> in unserem<\/em>) Home-Verzeichnis ein &#8211; etwa als Ganzes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PATH=\"\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin:\/usr\/games:\/home\/robert\/go\/bin\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>robert<\/code> ersetzen Sie nat\u00fcrlich durch Ihren Nutzernamen, lassen Sie die Konfiguration gleich offen und f\u00fcgen eine weitere neue Zeile ein:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export GEMINI_API_KEY=XxxxXXXxxxxXXXxxxXxxXX<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Statt <code>xxxXxxx...<\/code> setzen Sie hier Ihren kopierten API-Key ein, speichern die Konfiguration und starten das Terminal neu.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Gemini nutzen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Wollen Sie Gemini nutzen, starten Sie die Unterhaltung mit dem Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gemini<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini.jpg\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" width=\"463\" height=\"261\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini.jpg\" alt=\"\" class=\"wp-image-16892\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini.jpg 463w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-150x85.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-300x169.jpg 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Es startet ein eigener Prompt &#8211; und schon k\u00f6nnen Sie lostippen, Beispiel:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-1.jpg\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"288\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-1.jpg\" alt=\"\" class=\"wp-image-16893\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-1.jpg 595w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-1-150x73.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-1-300x145.jpg 300w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Haben Sie Ihre Frage abgeschlossen, best\u00e4tigen Sie dies mit Eingabe &#8211; m\u00f6chten Sie die Antwort in Deutsch, sagen Sie dies der Software ganz einfach:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-2.jpg\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" width=\"661\" height=\"343\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-2.jpg\" alt=\"\" class=\"wp-image-16894\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-2.jpg 661w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-2-150x78.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/10\/gemini-2-300x156.jpg 300w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Mit Strg+c k\u00f6nnen Sie die Ausgabe beenden, mit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gemini -h<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">holen Sie sich weitere Hilfe.<\/p>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"16891\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">7    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"16891\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>KI &#8211; also k\u00fcnstliche Intelligenz ist so eine Geschichte. Ich selbst bezeichne solche Software nicht wirklich als k\u00fcnstliche Intelligenz, mehr als gut belesene Datenbank. Wenn man Fragen richtig stellt, kann es vorkommen, dass man auch mal eine passende Antwort bekommt. Wenn ich KI wirklich mal brauche, nutze ich selbst Google Gemini (ehemals Bard). Liefert &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":16894,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[628,4],"tags":[46,697,12,698,7,6],"class_list":["post-16891","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kuenstliche-intelligenz","category-terminal","tag-internet","tag-ki","tag-kommandozeile","tag-kuenstliche-intelligenz","tag-shell","tag-terminal"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/16891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=16891"}],"version-history":[{"count":2,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/16891\/revisions"}],"predecessor-version":[{"id":16896,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/16891\/revisions\/16896"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/16894"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=16891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=16891"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=16891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}