{"id":51417,"date":"2026-06-19T11:37:41","date_gmt":"2026-06-19T11:37:41","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=51417"},"modified":"2026-06-19T11:37:41","modified_gmt":"2026-06-19T11:37:41","slug":"install-fish-shell-set-default-in-ubuntu-26-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2026\/06\/install-fish-shell-set-default-in-ubuntu-26-04\/","title":{"rendered":"Install Fish Shell &#038; Set Default in Ubuntu 26.04"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-51423\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-logoicon-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-logoicon-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-logoicon-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-logoicon-700x700.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-logoicon-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-logoicon.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>This tutorial shows how to install the latest version of fish shell, and set it as default in Ubuntu. Though the title says for Ubuntu 26.04, it also works on Ubuntu 24.04 and 22.04.<\/p>\n<p>Fish, stands for <b>F<\/b>riendly <b>I<\/b>nteractive <b>SH<\/b>ell, is an extremely popular command line interpreter that reads your text input, interprets and tells OS what to run, and returns the output.<\/p>\n<p><!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-51418\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-shell-700x537.webp\" alt=\"\" width=\"610\" height=\"468\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-shell-700x537.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-shell-300x230.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-shell.webp 702w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>Compare to the default bash shell, Fish provides a faster and smoother user experience. It features smart auto-suggestion that displays predictions based on history and PATH, in a muted gray color directly after your cursor.<\/p>\n<p>It has out-of-the-box syntax highlighting that colorizes commands, flags, variables, and errors as you type. As well, it features modern and clean syntax, and ships with thousands of completions for tools like git, docker, and kubectl.<\/p>\n<h3>How to Install The Latest Fish shell in Ubuntu:<\/h3>\n<p>Fish is available in Ubuntu repository, but always old!<\/p>\n<p>For the latest version, it&#8217;s available to install through the <a href=\"https:\/\/launchpad.net\/~fish-shell\/+archive\/ubuntu\/release-4\" target=\"_blank\" rel=\"noopener\">official PPA<\/a> (4.x series so far). And, so far it supports Ubuntu 22.04, Ubuntu 24.04, and Ubuntu 26.04 on AMD\/Intel and ARM64 (e.g., Snapdragon X and RasPi) platforms.<\/p>\n<p>1. First, press Ctrl+Alt+T on keyboard to open terminal, then run command to add the PPA:<\/p>\n<pre>sudo add-apt-repository ppa:fish-shell\/release-4<\/pre>\n<p><i>For Ubuntu Server, you probably need to refresh cache and install the <code>software-properties-common<\/code> package first for being able to use the add repository command:<\/i><\/p>\n<pre>sudo apt update; sudo apt install software-properties-common<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-51419\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish4-ppa-700x516.webp\" alt=\"\" width=\"610\" height=\"450\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish4-ppa-700x516.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish4-ppa-300x221.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish4-ppa.webp 716w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>2. For Linux Mint, refresh cache, while Ubuntu does it automatically during adding PPA:<\/p>\n<pre>sudo apt update<\/pre>\n<p>3. Finally, install fish shell via command:<\/p>\n<pre>sudo apt install fish<\/pre>\n<p>The last command usually selects install the latest version. Just in case, you may run <code>apt policy fish<\/code> to check if the one from PPA is available, and no other versions with a higher priority (larger than 500).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-51420\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/apt-fish4-700x565.webp\" alt=\"\" width=\"610\" height=\"492\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/apt-fish4-700x565.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/apt-fish4-300x242.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/apt-fish4-768x619.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/apt-fish4.webp 806w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<h3>Configure Fish Shell<\/h3>\n<p>Fish shell provides a web based UI, allowing to change its color scheme and prompt, as well as managing functions, history, variables, and bindings.<\/p>\n<p>To start the config UI, simply run <code>fish<\/code> command to switch to the shell, and then run <b>fish_config<\/b> command to start the web server. It will automatically open the UI in your default web browser:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-51424\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-shellconfig-700x410.webp\" alt=\"\" width=\"610\" height=\"357\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-shellconfig-700x410.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-shellconfig-300x176.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-shellconfig-768x450.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-shellconfig.webp 1411w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>For Ubuntu server without a graphical desktop environment, then either edit config files under <code>.config\/fish<\/code> (see the <a href=\"https:\/\/fishshell.com\/docs\/current\/#configuration\" target=\"_blank\" rel=\"noopener\">documentation<\/a> for details) directory, or, connect to your server with port forwarding:<\/p>\n<pre>ssh -L 8000:localhost:8000 user@your-server<\/pre>\n<p>Finally run <code>fish_config<\/code> and open <code>localhost:8000<\/code> in your local web browser.<\/p>\n<h3>Set Fish as Default Shell<\/h3>\n<p>After installed the package, you may run <code>fish<\/code> command every time to switch to the fish shell, and run <code>exit<\/code> to exit, or set it as default either for your terminal app only or login shell.<\/p>\n<h4>Set Fish as default for your Terminal app<\/h4>\n<p>For Ubuntu 26.04 with default Ptyxis terminal, simply open the terminal preferences dialog from its hamburger menu (\u2261). Then switch to Profile and click edit the current profile.<\/p>\n<p>In the pop-up profile editing dialog, turn on &#8220;Use Custom Command&#8221; toggle under Shell section and input <code>fish<\/code>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-51421\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/ptyxis-profileshell-700x393.webp\" alt=\"\" width=\"610\" height=\"342\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/ptyxis-profileshell-700x393.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/ptyxis-profileshell-300x169.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/ptyxis-profileshell-768x432.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/ptyxis-profileshell.webp 1384w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><br \/>\nFor Ubuntu 24.04\/22.04, open terminal preferences and navigate to Profiles (Unnamed by default) -&gt; Command -&gt; Run a custom command instead of my shell, and input <code>fish<\/code>.<\/p>\n<p>After that, every time you launch the terminal app, it automatically switches to the fish shell.<\/p>\n<h4>Set Fish as default for all command consoles<\/h4>\n<p>If you want to set fish as default shell for all terminals, tty console, SSH remote connection, then you may set it as login shell.<\/p>\n<p><b>NOTE: Setting fish as your login shell may cause issues, such as an incorrect PATH!<\/b><\/p>\n<p><b>1.<\/b> First, open terminal and run command below to list all the valid shells in your system:<\/p>\n<pre>cat \/etc\/shells<\/pre>\n<p>If &#8216;fish&#8217; is not in the list, run <code>command -v fish | sudo tee -a \/etc\/shells<\/code> command to add it.<\/p>\n<p><b>2.<\/b> Next, run the command below to change login shell to fish:<\/p>\n<pre>chsh -s \"$(command -v fish)\"<\/pre>\n<p>Note this only works for the current user that you execute the last command.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-51422\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-loginshell.webp\" alt=\"\" width=\"674\" height=\"532\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-loginshell.webp 674w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2026\/06\/fish-loginshell-300x237.webp 300w\" sizes=\"auto, (max-width: 674px) 100vw, 674px\" \/><\/p>\n<p>After that, you may re-launch terminal, switch to TTY console (Ctrl+Alt+F1~6), or re-start your SSH connection, it should automatically switch to fish shell.<\/p>\n<p>(<b>Optional<\/b>) As mentioned, changing the login shell may cause issues. If something goes wrong, use the command below to switch back to bash shell:<\/p>\n<pre>chsh -s \"$(command -v bash)\"<\/pre>","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to install the latest version of fish shell, and set it as default in Ubuntu. Though the title says for Ubuntu 26.04, it also works on Ubuntu 24.04 and 22.04. Fish, stands for Friendly Interactive SHell, is an extremely popular command line interpreter that reads your text input, interprets and tells [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":51423,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[2159],"class_list":["post-51417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-linux-command"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/51417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=51417"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/51417\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/51423"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=51417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=51417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=51417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}