DebianDebian Based

How To Install Fish Shell on Debian 12

Install Fish Shell on Debian 12

In this tutorial, we will show you how to install Fish Shell on Debian 12. Fish Shell, also known as “fish,” is a modern command-line interface that is designed to be user-friendly and interactive. It offers features like syntax highlighting, autosuggestions, and tab completions, which enhance the user experience and productivity on the command line. Fish is not just a shell but also a scripting language, allowing users to write and execute scripts with ease.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Fish Shell on a Debian 12 (Bookworm).

Prerequisites

  • A server running one of the following operating systems: Debian 12 (Bookworm).
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for Fish Shell.
  • A user account with sudo privileges to execute administrative commands.

Install Fish Shell on Debian 12 Bookworm

Step 1. Update the package lists to get the latest versions of packages and their dependencies:

sudo apt update
sudo apt upgrade

Step 2. Installing Fish Shell on Debian 12.

Install Fish Shell from the official Debian repositories:

sudo apt install fish

Verify the installation by checking the version of Fish Shell:

fish --version

Step 3. Configuring Fish Shell.

  • Setting Fish as the Default Shell

To fully integrate Fish into your daily workflow, set it as your default shell:

chsh -s /usr/bin/fish

This command changes your default shell to Fish, enhancing your command-line experience every time you log in.

  • Customizing the Fish Environment

Fish is highly customizable. Start by editing the Fish configuration file located at ~/.config/fish/config.fish. This file is the heart of Fish customization, allowing you to add custom functions, variables, and startup commands.

For more dynamic customization, Fish offers a web-based configuration tool accessible via:

fish_config

This tool provides a user-friendly interface for customizing prompts, functions, and color schemes.

Step 4. Accessing Fish Shell on Debian.

Use your preferred method to open a terminal window on your Debian system. Type fish and press Enter. This command switches your current session to Fish Shell. You’ll notice the prompt change, indicating that Fish is now running.

Install Fish Shell on Debian 12 Bookworm

Step 5. Uninstall Fish Shell.

To uninstall Fish, you’ll need to use the package management commands to remove the Fish package, the repository, and any residual configuration files. This will clean up your system and remove all traces of Fish:

sudo apt remove fish

After uninstalling Fish, you may want to switch back to your previous shell, such as Bash. This can be done using the chsh command, which will restore your original shell as the default:

chsh -s /bin/bash

Congratulations! You have successfully installed Fish Shell. Thanks for using this tutorial to install the latest version of the Fish Shell on Debian 12 Bookworm. For additional help or useful information, we recommend you check the official Fish Shell website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button