Skip to content

Commit 982e10f

Browse files
committed
updated intro text and added history command.
1 parent cafdfd2 commit 982e10f

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
# The Very Basics of the Unix Command Line
22

33
<br/>
4+
## Introduction
45

6+
Welcome to the **Very Basics of the Unix Command Line**! When you open a terminal (sometimes called a “shell”), you enter a powerful text-based environment that gives you deep control over your operating system. Instead of navigating graphical icons and menus, you’ll type commands to accomplish tasks—everything from creating and organizing files to automating repetitive work.
7+
8+
Here are a few reasons why the command line is valuable:
9+
10+
- **Speed and Efficiency**: Once you learn a few basic commands, many tasks become faster than they would be in a graphical interface.
11+
- **Automation**: Shell scripting allows you to compose commands into small programs that handle repetitive tasks.
12+
- **Precision**: You have direct control over every file, directory, and process, which is especially helpful for development and data analysis work.
13+
14+
**How this course works**:
15+
1. You’ll learn how to navigate Unix-like file systems, manage files and directories, set permissions, and write simple scripts.
16+
2. Each section provides hands-on examples—run them as you read to build familiarity.
17+
3. Don’t worry if some concepts feel abstract at first. With practice, you’ll develop the “muscle memory” and confidence to use the command line effectively.
18+
19+
---
520
## Outline
621

722
* Navigating a *nix operating system with a terminal.
@@ -12,6 +27,8 @@
1227

1328
<br/>
1429

30+
31+
1532
## Getting Basic System Information
1633

1734
You can get some basic **system information** by running the command `uname`:
@@ -393,6 +410,34 @@ head -n 100 covid.csv | tail
393410
394411
<br/>
395412
413+
## One Additional Helpful Command: `history`
414+
415+
- In many Unix shells (such as bash, zsh, etc.), the history command is a quick way to review all of the commands you’ve recently executed. This can be incredibly helpful for beginners (and experts!) who want to:
416+
417+
- Recall a command they typed earlier without retyping it completely.
418+
Learn from mistakes or remember a command’s syntax.
419+
Search for an older command in the history and reuse it.
420+
421+
### Basic Usage
422+
423+
```bash
424+
history
425+
```
426+
427+
- Lists all recenet commands with an associated number
428+
429+
```bash
430+
!42
431+
```
432+
If you see a command you want to repeat (for example, #42 in the history list), you can type !42 to immediately re-run that exact command.
433+
434+
### Searching Through History
435+
While you can press the Up Arrow to cycle through your commands, you can also search:
436+
437+
1. Ctrl + R: Press Ctrl + R, then begin typing part of a previous command. It will do a reverse search in your history to find a matching command.
438+
2. Press Ctrl + R multiple times to navigate through more matches.
439+
3. Press Enter to re-run the selected command.
440+
396441
## Getting Started with Shell Scripting
397442

398443
The real power of the command line is shell scripting. Otherwise we would all just be using GUI-based apps! Scripting allows us to string commands together and automate certain tasks not possible with GUI-based applications.

0 commit comments

Comments
 (0)