The Linux Command Line
Foreword
Notes. The 537-page volume covers the same material as LinuxCommand.org, but in much greater detail. In addition to the basics of command line use and shell scripting, The Linux Command Line includes chapters on many common programs used on the command line, as well as more advanced topics.
1.0 Learning the Shell¶
1.1 What Is “The Shell”?,
terminal
1.2 Navigation,
file, system, organization, working directory
1.3 Looking Around,
list, file, size, group, owner, permission, create text file, long format, classify, examine
1.4 A Guided Tour,
directory, root, boot, etc, bin, usr, local, var, lib, home, root, tmp, dev, proc, media
1.5 Manipulating Files,
copy, move, remove, create directory
1.6 Working With Commands,
type, display information, which, locate, help, command, manual
1.7 I/O Redirection,
input, output, pipeline, pipe, filter, sort, uniq, pattern, read text, grep, fmt, split, page break, header, footer, pr, first line, last line, head, tail, translate, tr, editor, sed, awk
1.8 Expansion,
echo, pathname, quote, double-quote, escape, backslash
1.9 Permissions,
permission, chmod, su, sudo, chown, chgrp, directory
1.10 Job Control,
job, process, ps, kill, jobs, background, bg, foreground, fg
2.0 Writing Shell Scripts¶
2.1 Writing Your First Script And Getting It To Work,
editor, vi, vim, emacs, nano, gedit, kwrite, path
2.2 Editing The Scripts You Already Have,
edit, shell, location, path, export path, alias, environmental variable, today
2.3 Here Scripts,
script, here, shebang, output, append
2.4 Variables,
script, variable, create, environment
2.5 Command Substitution And Constants,
command substitution, constant, assigning, assign
2.6 Shell Functions,
shell function, open page, head section, right title, close, body section, timestamp, right, time, macro,
2.7 Some Real Work,
uptime, time, show_uptime, drive, space, drive_space, home, space, home_space
2.8 Flow Control - Part 1,
if, test, testing, exit, clear
2.9 Stay Out Of Trouble,
empty variable, missing quote, isolating, isolate, run script, watch
2.10 Keyboard Input And Arithmetic,
read, arithmetic
2.11 Flow Control - Part 2,
branch, branching, case, loop, while, building an menu
2.12 Positional Parameters,
positional parameters, command line, arguments, options, command line processor into script, interactive
2.13 Flow Control - Part 3,
loop, for, if, else, find, wc, system_info
2.14 Errors And Signals And Traps (Oh My!) - Part 1,
check, checking, exit status, error, and, or
2.15 Errors And Signals And Traps (Oh My!) - Part 2,
clean, cleaning, trap, kill, clean_up, temporary, file
3.0 Resources (some)¶
Adventures¶
A directory browser and file manager for command line users.
gui, file, directory, manipulation, copy, move, rename, delete, permission, remote system, ftp, ssh, .tar, .zip, local, hotlist, name, content
Give your terminal some serious muscle.
like gnome, konsole, gnu, desktop, multiple shell session single terminal, display, several computer
Fingers getting tired? Let’s look at ways to save our digits!
alias, shell functions, script, program, alias, cli, editor, control
We take a deeper look at this powerful feature.
i/o, input, output, pipeline, pipe, exec
Our scripts can have more visual appeal!
tput, ncurses, terminal, manipulate, change, color, effect, text
Let’s give our scripts a better user interface.
incorporate, script, build list, calendar, checklist, directory, box, form, file select, gauge, pause, gui, simple, simplify
Pattern scanning and text processing language. One of the truly classic Unix tools.
awk, programming language, coding, code, script
While most Linux users rely on the bash shell every day, it’s not the only game in town. Let’s look at some of the others.
dash, debian almquist shell, tcsh, texex c shell, ksh, korn shell, zsh, z shell
Shell Scripts¶
A bash shell script template generator. Use this script to help write your own shell scripts. Generated templates include useful shell functions, error and signal handling, and command-line option and argument parsing.
script, example, case
Implements a primitive cloud storage system using any available remote host running an SSH server.
script, example, case, dropbox
Re-sizes large image files (photos) for use as attachments to email messages, blog postings, etc.
script, example, case, read image file, convert, size
Creates an annotated list of programs in a directory. Useful for exploring your system.
script, example, case, program_list, list, whatis, what
Manuals¶
- Granneman, Scott, Linux Phrasebook, 2015.
- Parker, Steve, Shell Scripting: Expert Recipes for Linux, Bash and more, 2011.
- Ward, Brian, How Linux Works: What Every Superuser Should Know, 2014.