WTF is bash and why do I want to know more about it?

Supervisor

Administrator
Apr 27, 2015
1,863
2,546
335
Well,
basically... BASH is THE tool for linux. You can do everything you want to do with bash. So, what is it?
Born Again SHhell -> BASH is a better version of SHell. Shell is the default used by linux.
So, from what I experienced you can do more with BASH and it is more user friendly.
There is one downside of bash (well - not really *lol*), the bash executable is bigger and does need a little bit more recources than sh. Personally, I don't think that matters anymore nowadays.
There are a few more Shells you can use on linux, but (DA)SH and BASH are installed by default, so you can rely on them when writing scripts and programs.

When you start writing your own little scripts you may have recognized the #!/bin/sh or #!/bin/bash in the first line. Basically This first line is telling your operating system what shell it should use to read and execute your script. Pretty straight forward, isn't it?
If you don't put this first line, it will always use the standart. That is sh if not changed manually.
You've got to love Linux. Just imagine, what would happen if you don't put the .exe extension in Windows? ahahaha

So, conclusion: if you want to do stuff in linux, you've get to know sh/bash a little better. So for all of the guides that may follow, I will always use bash. Also everything I'm gonna write down will be based on my own personal experience. If you know it better, you're welcome to to post comments :) I'm willing to learn :D

There is another nice thing.. just open an executable with your favorite editor (I recomment nano) and you'll be able to see the source code and understand what the script is doing just by looking at it.
It's really easy!
 
Last edited:
Top