All right, guys, in this module, I'm going to teach you something really, really cool and really 1
useful as well for any technology Web Development or Back-end Development, 2
the Command Line is going to be your friend. 3
So what is the Bash shell? 4
Well, to understand the Bash shell, we first have to know what a Shell is. 5
And this graphic is a good way of tackling that. 6
If you think about your operating system as a Pistachio nut, then the Kernel. 7
So the actual Pistachio, the thing that you're going to eat. 8
I'm really sorry about all the food analogies. 9
You can clearly tell I'm pretty much hungry most of the time when I'm recording these videos, but let's 10
get back to the topic. 11
If you're operating system is a Pistachio, then the actual nut is the Kernel. 12
And in computing, the Kernel refers to the actual program that interfaces with the hardware. 13
So it's the core of your operating system. 14
Now the Shell in computing refers to the user interface for you as a human to be able to interact with 15
the kernel and in turn with the hardware of your computer. 16
And there's two variants to the shell. 17
There are Graphical User Interface Shells, 18
so for example, when you open up Finder, you're using a graphical user interface to access and find 19
your files, 20
but there's also a Command Line Interface, which is what we're going to be talking about and what we're 21
going to be learning about in this module. 22
So this is an alternative way of interfacing with the kernel. 23
Now it can seem intimidating at first, but I want to show you that it's actually super simple. 24
And once you understand it, you're going to see that it's actually a really, really useful tool at 25
your disposal. 26
Coming back to the shell that we're going to be using, which is a Bash Shell, and it stands for The 27
Bourne Again Shell and it's named after a Mr. Bourne but not this Mr. Bourne But this. 28
Mr. Bourne, 29
and I can attest that they are equally badass. 30
And the Bourne Again,Shell or the Bash Shell is a CLI or a Command Line Interpreter for the Unix system. 31
And you find Unix-based systems or Unix-like systems all over the place. 32
So for example, Linux is a Unix-like system and a lot of servers will run on Unix and even Mac OS 10 33
or the newly named Mac OS runs on a Unix-like operating system. 34
And this is a completely different family from the Windows side of things, which uses Dos and Windows. 35
A lot of things that you can do with command line can be done using the graphical user interface, 36
so why use the command line at all? 37
At the end of the day, what it all boils down to is about greater control. 38
And in your journey of becoming a better developer, you will need to understand and exert more power 39
over your tools. 40
That is the computer hardware. 41
But on a more day to day basis, you will find that if you're a regular command line user, that it's 42
actually easier and faster to do a lot of really common things. 43
For example, inside the Terminal, if I wanted to make a music folder, then it's as simple as 44
"mkdir Music." 45
And now there it is, there's my music folder. 46
But if I want to do Inside Finder, for example, I first have to go to Finder. 47
I have to navigate to my desktop or whichever directory I want to create it inside and then I have to 48
maybe right-click new folder and then type something like music, right? 49
And that takes a lot of effort. 50
Whereas you know, say if I wanted to create music to make another folder, it's as simple as hitting 51
the up arrow and hitting 2. 52
So for me, it's a lot about speed and a lot about control. 53
The other thing that you'll notice about a lot of these graphical user interfaces is they try to hide 54
a lot of the complicated stuff or the unnecessary stuff like configuration files from the common user. 55
And the idea is that, you know, unless you know how to deal with it, then you probably shouldn't 56
be dealing with it. 57
But with the command line, you have full control and you have a lot of flexibility. 58
So for example, on my desktop, you can only see one folder with no files called App Development, 59
right? 60
So I'm on my desktop at the moment Inside Finder, but actually, if you use Terminal, you can actually 61
list all the files. 62
And if I just I add this "-a" flag, you can actually see that I've also got a folder called Secret 63
Stuff and you can create these hidden folders by simply writing mkdir, say secrets. 64
And now if I list again, I've now got two secret folders. 65
And later on, when we're going to teach you Git and Version control, we're going to be using the command 66
line really heavily to show you the easiest and probably the most popular way amongst developers, at 67
least, of using Git and Version Control. 68
So I hope I've sold you on. 69
The virtues of the command line. 70
So without further ado, let's get started learning how to use it. 71
What are some of the most common commands and some tips and tricks as well.