Bash vs. Fish? I’ve tried both Linux shells, and one makes using the command line much easier


fishhero

Jack Wallen/ZDNET

Follow ZDNET: Add us as a preferred source on Google.


ZDNET’s key takeaways

  • The Linux shell enables communication with the kernel.
  • The default shell for most distributions is Bash.
  • There’s a much more user-friendly option, called Fish.

Essentially, the Linux shell interprets commands so the kernel can understand and use them. Without the shell, not only would commands not work, but applications wouldn’t work.

So, yes, the shell is very important.

Most Linux distributions default to the Bash shell, which stands for Bourne Again Shell. Why “Bourne”? Because Bourne shell was the first shell, and Bash is an improvement on that. With Bash, you can write bash scripts that can do just about anything. However, Bash has been around for a very long time, and it really hasn’t changed much.

Also: I joyfully reunited with my first Linux distro at the Virtual OS Museum

The good news is that there are alternatives, and one of those alternatives adds features that Bash has neglected. That shell is called Fish (Friendly Interactive SHell). The big difference between Bash and Fish is that Bash feels like it works for you, and Fish feels like it works with you.

That might not make sense at first, but let me explain.

The difference between Bash and Fish

When you run a command in Bash, you type it, hit Enter, and wait to see if it worked. Bash doesn’t help you; it just accepts the command and attempts to run it. That’s it.

Fish behaves a bit differently. When you start to type a command in Fish, it will offer suggestions (based on your history). When you see a suggestion that works for you, hit the right-pointing arrow key to accept a suggestion. For example, you might type ssh, and Fish will then present a suggestion like ssh 192.168.1.26. Hit the arrow key and then hit Enter.

Also: The first 5 Linux commands every new user should learn

You might also notice that Fish uses colors. For example, if you type an invalid command, Fish will color it red. If you alter an invalid command to make it valid, it turns blue.

If you start typing a file path, it’ll appear red, and as soon as the path is valid, it’ll turn blue.

When you start typing a command, pressing Tab will display several suggestions. You can then use your arrow keys to scroll through the list and select the command you want to run.

You can also set variables in Fish with the set command. For example, if I want to set a variable called name to my name, I could type:

set name jack

Now, I can use that variable like this:

echo “My name is $name”

Also: Why Wave is my new go-to terminal app – how I use this powerful tool

The response will be:

My name is jack

Fish is user-friendly in other ways. For instance, in Bash, you use back ticks (`) to indicate a command, which can often be confusing. In Fish, commands are placed in parentheses like this:

echo (whoami) in (pwd)

The results of the above command would be:

jack in /home/jack

You can also set abbreviations for commands (similar to aliases in Bash). Let’s say you use the git checkout command a lot and want to make it a bit more efficient. If you want to create the abbreviation gco for that command, it would be:

abbr –add gco git checkout

Or you could set several ssh abbreviations, like so:

abbr –add ssh11 “ssh 192.168.1.11”
abbr –add ssh12 “ssh 192.168.1.12”

Now, when you type ssh11, you’ll connect to 192.168.1.11, and if you type ssh12, you’ll connect to 192.168.1.12.

Also: The best Linux distros for beginners

Those abbreviations remain, even after logging out.

Fish also includes a handy calculator. For example, you could type:

math 5020/220

The answer (22.818182) will be presented at the prompt.

Installing and setting the Fish shell

Fish can be installed from your distribution’s standard repositories. For example, in Ubuntu, the command to install Fish would be:

sudo apt-get install fish -y

On Fedora, that command is:

sudo dnf install fish -y

On Arch, the command is:

sudo pacman -S fish

Once you’ve installed Fish, you must set it as the default shell with the command:

chsh -s $(which fish)

Also: 5 surprisingly productive things you can do with the Linux terminal

If you wind up not liking Fish (you will), you can change it back to Bash with:

chsh -s $(which bash)

And that’s the Fish shell. Remember, if you teach someone to Fish… you empower them for a lifetime.





Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


Need Extra Funds, Fast? Now You Can Get Up to P50,000 with Maya Easy Credit

Sometimes, you need extra funds quickly. This isn’t always due to errors or issues, but because life’s circumstances can be unpredictable: bills may accumulate and overlap, expenses might come sooner than expected, or your paycheck might not have been deposited yet. These common situations can catch you off guard.

Borrow Up to P50,000 with Maya Easy Credit

Borrow Up to P50,000 with Maya Easy Credit

That’s precisely where Maya Easy Credit[1], from Maya, the nation’s top Digital Bank and leading all-in-one fintech platform, fits in.

Now with an increased limit of up to P50,000, Maya Easy Credit offers quick access to additional funds during urgent times. Whether you need to cover overlapping bills, manage expenses before your next paycheck, or just create more breathing room, it’s designed to support you through those moments—without adding complexity.

The reality is that many traditional options are created for larger, long-term commitments, which are often more than what’s necessary for a short-term gap.

Maya Easy Credit offers flexibility without long-term commitment. You can use it as a revolving credit line: borrow only what you need, repay within 30 days, and pay a service fee starting at 3.99%, calculated only on the used amount. It’s straightforward, transparent, and easy to manage.

Honestly, this change has been inevitable for a while. For years, credit was stigmatized — seen as something to avoid and only used when problems arose. However, daily financial management no longer operates that way.

Lately, the focus is less on major emergencies and more on timing. Your expenses (gastos) don’t always align with your salary (sweldo), and often, the real challenge isn’t about affording something but having the funds available at the moment.

That’s why credit is beginning to seem different. No longer a last resort, but a useful instrument—something you can rely on when appropriate: short-term, adaptable, and straightforward to handle, providing just enough to keep progress steady.

Since Maya Easy Credit is integrated into the app you already use for payments and savings, it offers a seamless experience. You can check your available credit and make repayments directly within the app—no paperwork, no collateral, no additional steps. It provides instant access whenever you need it.

Having that option alters your perspective on managing money. What’s truly changing isn’t only how people utilize credit, but also how it integrates into daily life. It’s no longer just a resource for emergencies; it’s increasingly a part of everyday financial handling.

And sometimes, that’s all it takes—just a little extra to keep things moving.

To know more, visit maya.ph or mayabank.ph, and follow @mayaiseverything on Facebook, Instagram, YouTube, and TikTok to stay updated. Approval and offer are subject to credit evaluation. Maya Philippines, Inc. and Maya Bank, Inc. are regulated by the Bangko Sentral ng Pilipinas. www.bsp.gov.ph. For 24/7 assistance, visit the Help Center in the Maya app or call us from 8 AM to 7 PM daily at +632 8845-7788.

Follow and subscribe to OutofTownBlog.com  on  Facebook Twitter Instagram, Pinterest, and YouTube  for more Travel-related updates.

Read: Get Summer-Ready: Boost Your Travel Fund with Maya





Source link