/ factorpad.com / tech / linux-essentials / bash-command.html
An ad-free and cookie-free website.
Beginner
Learn to interpret what bash does at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux bash Command Summary with Examples (3:43)
Our ninth word, or command to memorize is bash
from the category System.
bash
allows you to interact with the
terminal. In our last video we noted the challenge in finding a
handy man
page for the
cd
command. This is because the
cd
command is contained within the
bash
command. Sound confusing?
I'll explain.
-options | description |
---|---|
--help |
Shows syntax and several long options |
-c help |
A help screen on shell builtin commands |
It may help to think of commands as mini programs and most follow this
structure:
command -option(s) argument(s)
.
The bash
command has
22 options and the list of arguments is vast so
here I've listed two ways to find helpful information.
So why is bash
an important command?
Simply, it's the way we interact with the computer.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows 10.
Here we go, so bash
is running by
default. Type bash --help
for usage,
long options, and look here is a useful command
bash -c help
.
Next, let's try it. bash -c
with the
argument help
.
And voila, there are the 60 or so commands called builtins.
Shift-PgUp
(to scroll up one page),
Shift-PgDn
(to scroll down one page).
bash
includes this set of commands.
Are you still confused?
This discussion is unique, because we're in
bash
, we've been using
bash
every time we open the terminal,
and it's the default program loaded at startup. And you've seen
builtins. Look (above) there's cd
from video 8, exit
from video 1 and
pwd
from video 6.
So why did I, unconventionally, explain the
bash
command this early in the
Playlist? Well, I hope this helps you understand the relationship
between bash, its builtins, and how to find help.
Okay now you know how to use bash
.
And you know the syntax for commands, options and arguments.
One last tip about the bash
command.
Many Linux distributions come with a variety of shell options like
bash
and in the next tutorial I'll
show you how to find which ones are available.
Okay, thanks for visiting today. I hope this was a fun introduction
to the bash
command.
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
The learning journey never stops. Subscribe to be a part of it.
cd
command, hit
Back.cat
command, click Next./ factorpad.com / tech / linux-essentials / bash-command.html
A newly-updated free resource. Connect and refer a friend today.