Learn command line basics
Ten short sessions built on Software Carpentry's free Unix Shell lessons. You'll build a practice folder from scratch, learn the 20 or so commands people use every day, and finish by organizing a messy folder entirely from the terminal.
Outcome
Confident everyday use of pwd, ls, cd, mkdir, touch, echo, cp, mv, rm, cat, head, tail, wc, less, sort, uniq, grep, and find, plus wildcards, redirects, and pipes.
- Every resource is a real public page our team picked. Our server checks the links; if one ever breaks, tell us and we'll replace it.
- rm deletes permanently, with no Trash or Recycle Bin. Practice only inside the cli-practice folder until the habits are automatic.
- Never paste commands from a website or message you don't trust, especially ones starting with sudo or containing rm -r or curl.
- Windows users: this journey uses Git Bash. Windows' own Command Prompt uses different commands. Output wording varies slightly between Mac, Linux, and Git Bash.
- 10,000 seconds is a structured starting point. It builds a real first result, not guaranteed expertise.
Outline
- 116:40
Open a terminal and run your first commands
You can open a terminal, run a command, and read an error without panicking.
- 216:40
Find out where you are
You can say which folder you're in and list what's in it, including hidden files.
- 316:40
Move between folders
You can move anywhere with cd and always get back home.
- 416:40
Create folders and files
A practice folder you built entirely from the terminal, with files that have text in them.
- 516:40
Copy, move, and rename
You can copy files and folders, move them, and rename them, and confirm each change.
- 616:40
Delete safely
You can delete files and folders on purpose, with habits that stop you deleting the wrong thing.
- 716:40
Read files: cat, head, tail, wc, less
You can read a whole file, its first and last lines, count its lines, and scroll a long file.
- 816:40
Wildcards, redirects, and pipes
You can work on many files at once and chain commands together to answer a question.
- 916:40
Search inside files and for files
You can find any word inside files with grep and any file by name with find.
- 1016:40
Capstone: organize a messy folder from the terminal
A messy folder sorted into subfolders, an inventory file, and a short report, all done without a mouse.
Capstone
A folder organized from the terminal
A messy folder of mixed files sorted into subfolders using wildcards, plus an inventory and a short report created with redirects and pipes, all without using a mouse.
Sources
- Command line crash course
MDN Web Docs (Mozilla)
Not yet verifiedFree - The Unix Shell: Working With Files and Directories
Software Carpentry
Not yet verifiedFree - The Unix Shell: Finding Things
Software Carpentry
Not yet verifiedFree - The Unix Shell: Introducing the Shell
Software Carpentry
Not yet verifiedFree - The Unix Shell: Navigating Files and Directories
Software Carpentry
Not yet verifiedFree - The Unix Shell: Pipes and Filters
Software Carpentry
Not yet verifiedFree - The Linux command line for beginners
Ubuntu (Canonical)
Not yet verifiedFree