Bash and Shell Scripting
Bash is the Bourne Again SHell which extends the original shell (sh). This is the terminal that typically is where most Linux operating systems will use for end-users. Bash is an open-source software from GNU (GNU Not Unix) which is available publicly and has a variety of useful resources in addition to bash. The GNU Bash manual has quite an extensive and detailed list of all the features.
GNU Bash manual - GNU Project - Free Software Foundation
![](https://www.gnu.org/graphics/heckert_gnu.transp.small.png)
In addition to the GNU documentation/manuals, The Linux Documentation Project (TLDP) is extremely well documented for beginners and advanced users alike.
The Linux Documentation Project: Guides
Linux Documentation Project: Guides
![](https://tldp.org/images/ldp.gif)
Navigating the Shell
The first thing to be familiar with in Bash is to navigate around files and directories to do the common tasks that most are familiar with when interacting with a filesystem such as windows explorer.
Command | Description | Example |
---|---|---|
ls |
List directory contents (current directory if none specified). | ls /home/ |
mv |
Move directory/files from one location to another. Rename a file. | mv oldFile /opt/newFile |
cp |
Copy directory/files to another location. Recurse through a directory with "-r". | cp -r oldDirectory/ /opt/newDirectory/ |
rm |
Remove directory/files. Recurse through a directory with "-r". | rm -r oldDirectory/ |