Menu
“The command line: filters, files, pipes and redirects, processes, regular expressions and vi.”
Topic 103 is the biggest part of LPIC-1 exam 101: 26 of its 60 points. It’s all about working in the shell with the classic GNU and Unix tools: running and combining commands, reshaping text with filters, managing files and archives, wiring commands together with pipes and redirects, controlling processes and their priorities, searching with regular expressions, and editing files in vi.
Everything later in LPIC-1 assumes these skills, so take your time here. Each byte follows one exam objective and ends with a checklist of what to remember.
You’ll learn:
- how Bash runs commands, expands variables and finds programs in
PATH - how to filter, sort, count and cut text with
sort,uniq,cut,trand friends - how to copy, find, archive and compress files with
cp,find,tar,cpio,dd,gzip,bzip2andxz - how to redirect output and errors, build pipelines and use
teeandxargs - how to run jobs in the background, watch processes and send signals
- how to change process priorities with
niceandrenice - how to write basic and extended regular expressions for
grepandsed - how to edit any file in
vi, and set your default editor
You’ll need: a Linux machine, a VM or a container. docker run -it --rm debian or docker run -it --rm ubuntu gives you a throwaway shell in seconds (install extras like vim, procps, bzip2, xz-utils or tmux with apt update && apt install ...). You’re root inside a container; on a normal system, a regular user is enough for almost everything here, and you only need sudo for setting negative nice values, reading other users’ files and writing to system paths like /etc.
- 1 Work on the command lineBash basics for LPIC-1: running and chaining commands, quoting, variables and export, PATH, type and which, man, uname and history.
- 2 Process text streams using filterscat, head, tail, sort, uniq, cut, paste, tr, wc, nl, od, split, sed and checksums: small tools that reshape text.
- 3 Perform basic file managementls, cp, mv, rm, mkdir, touch, wildcards, find, tar, cpio, dd and gzip, bzip2 and xz: everyday file work on Linux.
- 4 Use streams, pipes and redirectsStandard input, output and error, redirecting them to files, piping commands together, tee, command substitution and xargs.
- 5 Create, monitor and kill processesForeground and background jobs, nohup, screen and tmux, ps, top, free, uptime and watch, and signals with kill, pkill and killall.
- 6 Modify process execution prioritiesNice values from -20 to 19: start programs with nice, change running ones with renice or top, and read priorities in ps and top.
- 7 Search text files using regular expressionsBasic and extended regular expressions with grep, egrep, fgrep, sed and find: anchors, classes, quantifiers, groups and substitutions.
- 8 Basic file editingSurvive and thrive in vi: modes, moving around, inserting, deleting, copying, searching, saving, plus nano, Emacs and the EDITOR variable.

Byte card
The whole topic on one card
- Commands join with ; && ||. Exit status 0 means success, and export passes variables to children.
- Small filters do one job each: sort | uniq -c | sort -nr answers 'what's most common?'
- 0 stdin, 1 stdout, 2 stderr. > overwrites, >> appends, > file 2>&1 catches both.
- kill sends SIGTERM (15) first; SIGKILL (9) can't be caught. Nice runs from -20 to 19.
- grep -E and sed -E speak extended regex. In vi: i to type, Esc, then :wq or :q!
Save it as a cheat sheet, or share it with someone who's learning this too.