The Bash shell
View Course Diagram
BASH
The Bash shell is a command-line interface typically used in Unix-based
operating systems such as Linux and macOS, but is also available for Windows.
It provides a way for users to interact with the operating system using
text-based commands instead of a graphical user interface.
Note
Since macOS 10.15 (released in Oct 2019), the default shell becomes
zsh which is not the same as Bash.
They are highly compatibile and you will be able to follow the materials of
this course by using zsh. Simply type bash followed by 'Enter' if you want
to use the Bash shell.Some basic commands you might use in Bash include:
ls: lists the contents in a directory.cd: changes the current directory to a specified directory.mkdir: makes new directories.rm: removes directory entries.echo: prints a message to the terminal.
In addition to these basic commands, you can use Bash to write scripts, which
are collections of commands that can be executed together. Bash scripts can be
used for tasks such as automating repetitive tasks, managing files, and running
programs.
Learning Bash can take some time, but it's a powerful tool for working with
Unix-based operating systems. There are many online resources available to help
you learn, including tutorials, books, and online communities.