Intro to Bash
Beginner
About Bash →
Move around, make files, search inside them and join commands with pipes. 24 levels at a live terminal prompt: you type the commands, the machine answers.
0 / 24 lessons complete
Start Lesson 1
1
Hello, Terminal
Make the terminal say hello, the very first thing to try in bash.
2
Where Am I?
Ask the terminal which folder you are standing in.
3
What Is Here?
List the files and folders around you.
4
A Closer Look
Ask ls for the long version, with sizes and dates.
5
Moving Around
Walk into a folder and look around.
6
Going Back Up
Climb back up the folder tree, then jump straight home.
7
Making a Folder
Create a new folder and watch it appear.
8
Making a File
Create a brand new, completely empty file.
9
Reading a File
Print what is inside a file.
10
Saving Output Into a File
Send a command's output into a file instead of the screen.
11
Adding to a File
Add a second line without wiping out the first.
12
Just the Top (and the Bottom)
Peek at the first and last lines of a file.
13
Copying a File
Make a spare copy of a file.
14
Moving and Renaming
Rename a file, then move it into a folder.
15
Deleting a File
Remove a file you no longer need, carefully.
16
Wildcards
Talk about a whole group of files at once.
17
Searching Inside Files
Find every line of a file that contains a word.
18
Counting Lines
Count how many things are in a file.
19
Sorting
Put a file's lines in alphabetical order.
20
Pipes
Join two commands together so one feeds the other.
21
Variables
Store a piece of text and use it again.
22
One Thing After Another
Run several commands in a row with &&.
23
Finding Files
Hunt for files anywhere below where you are standing.
24
Putting It All Together
Use everything you have learnt to build something from nothing.