What is Bash?
Bash is a coding language similar to Zsh. It is commonly used to navigate your computer without the hastle of using a mouse. Bash also allows you to see hidden files, change permissions of users, make all new files and directories, and so much more.
Where do I start with Bash?
Bash is used in the terminal of your computer.
I use MAC OS, so the default terminal is simply called "Terminal", but I personally prefer to use iTerm.
Note that all further instructions apply to MAC OS only, Bash works differently on Windows, which I am unfamiliar with.
What are some Bash commands?
There are hundreds, if not thousands, of Bash commands that are usable. In this post, I'll just be showing the very basics.
First thing's first, you're going to want to know where you are at all times in your terminal. In order to find out, you simply input "pwd" and press return. This stands for "print working directory". If done correctly, something like this should be displayed.
Where from here? You can use the command "ls" to list the directories available at where you are in your computer. Here's what that might look like.
Applications Downloads Movies Public Desktop Library Music Documents
This will be different for every user because not everyone will have the exact same file setup on their computer.
Let's say I wanted to dive in deeper into one of my directories listed from the previous command. You can change directories by using the command "cd" followed by the directory name.
For this example, let's say we wanted to access our desktop files through our terminal. We would input the following...
Simple as that! Now you can ls to see what files and directories are on your desktop.
Finally, let's talk about how you could go back a directory. If you're following along, you are now at your desktop directory. So, your directory should look like this...
In order to return to your previous directory, input the following...
This tells your terminal that you want to go up a level in your directory. So if you were to input pwd into your terminal now, you should be back at...
Also note that "admin" will be whatever user you are logged in as. Again, it will likely be different for every person unless you are using a virtual machine.
You're now ready for Bash
Now you know how to use basic navigation commands to where you can comfortably make your way through your terminal using Bash. Now, go explore!