Skip to content

103: GNU and Unix Commands

Tom Ormiston edited this page Sep 8, 2017 · 59 revisions

103.1 Work on the command line

Description: Candidates should be able to interact with shells and commands using the command line. The objective assumes the Bash shell.

Key Knowledge Areas: Use single shell commands and one line command sequences to perform basic tasks on the command line Use and modify the shell environment including defining, referencing and exporting environment variables Use and edit command history Invoke commands inside and outside the defined path

Terms and Utilities:

bash
echo
env
export
pwd
set
unset
man
uname
history
.bash_history

IBM: The Linux command line

List of Unix/Linux commands

UrbanPenguin: Linux BASH builtin commands

Joe Collins: Beginner's Guide to the Bash Terminal,1hr 15min

Bash beginners guide - a comprehensive text site

Command Line Basics 12: Handy Command Line Shortcuts


tutorialLinux: Your First 5 Minutes

  • How to see the current directory in the Linux filesystem

  • How to change directories in Linux -with shortcuts

  • How to see what's inside a directory

  • Bonus: where e-mail addresses came from

  • Where 'root' is on the filesystem

Linux Sysadmin Basics 02 - Basic Commands

  • pwd, ls, cd, mv, rm, rmdir, touch, mkdir, man

Linux Sysadmin Basics 02.1 - More Basic

  • Files: head, tail, tail -f, ln -s

  • Shell (bash): ctrl-a beginning of line, ctrl-e end of line, ctrl-r backwards history search, ctrl-c to interrupt, clear, ctrl-d closing connections/terminals, poweroff / init 0 / shutdown -h now

What's happening on this machine?

  • who's logged in, process resources in use, network exposure -netstat

Jason Wertz :Path & Command Basics

Jason Wertz: Getting Around in Unix - Basics

Jason Wertz: Basics of Getting Help in Linux

Steven Gordon- Directory Operations: pwd, cd, ls, mkdir, rmdir, TAB autocomplete

Digital Ocean: How To Read and Set Environmental and Shell Variables

103.2 Process text streams using filters

Description: Candidates should should be able to apply filters to text streams.

Key Knowledge Areas: Send text files and output streams through text utility filters to modify the output using standard UNIX commands found in the GNU textutils package

Terms and Utilities:

cat
cut
expand
fmt
head
join
less
nl
od
paste
pr
sed
sort
split
tail
tr
unexpand
uniq
wc

IBM: Text streams and filters

UrbanPenguin: 'cat' command

UrbanPenguin: 'cut' command

UrbanPenguin: Expand and Unexpand

UrbanPenguin: Translations with tr

UrbanPenguin: Using cat and od to fault find scripts

Steven Gordon- File Operations 1: touch, nano, wc, man

Steven Gordon- File Operations 2: touch, nano, wc, man

Jason Wertz: Finding Files: locate, find, which

Jason Wertz: Basics of Viewing Files in Linux

Unix Commands Tutorial for Beginners: Find, Regular Expression, grep, aw and, sed

UrbanPenguin: Using fmt and pr

UrbanPenguin: Cat, Head, Tail

UrbanPenguin: Using split

UrbanPenguin: Using Join

UrbanPenguin: Understanding the Linux Paste Command

UrbanPenguin: Learning SED Introduction to SED and cleaning config files

UrbanPenguin: Using fmt and pr

UrbanPenguin: Using cat and od to fault find scripts

UrbanPenguin: Cat Head & Tail

cat

103.3 Perform basic file management

Description: Candidates should be able to use the basic Linux commands to manage files and directories.

Key Knowledge Areas: Copy, move and remove files and directories individually Copy multiple files and directories recursively Remove files and directories recursively Use simple and advanced wildcard specifications in commands Using find to locate and act on files based on type, size, or time Usage of tar, cpio and dd

Terms and Utilities:

cp
find
mkdir
mv
ls
rm
rmdir
touch
tar
cpio
dd
file
gzip
gunzip
bzip2
xz
file globbing

IBM: File and directory management

UrbanPenguin: Creating archives with cpio

tutorialLinux: Basic tar Commands

Backups : tar, gzip

Fundamental Backup Techniques: tar, gzip, bzip2, rsync

Steven Gordon - Directory Operations: pwd, cd, ls, mkdir, rmdir, TAB autocomplete

Joe Collins: The "Disk Destroyer" - How to Use the dd Command

Unix Commands Tutorial for Beginners: System, File Systems, File Content, Handling, Archiving and File Transfer

Creating and Deleting Files and Folders in Linux

Moving and Copying Files and Directories in Linux

Linux Leech: pwd

Linux Leech: cd

Linux Leech: ls

Linux Leech: mkdir

Linux Leech: rm and rmdir

Linux Leech: cp

Linux Leech: mv

Linux Leech: less

Linux Leech: file

Jason Wertz: Using Zip and Tar

Jason Wertz: Archiving Files in Linux

UrbanPenguin: mkdir and rmdir

UrbanPenguin: Copy and Move Files in Linux

UrbanPenguin: Using the find command in Linux

UrbanPenguin: CentOS 7 Using gedit

Command Line Basics: Moving Around

Command Line Basics: Copy, Move, Delete

Command Line Basics: Using Zip and Tar

Exercises in Backing up

103.4 Use streams, pipes and redirects

Description: Candidates should be able to redirect streams and connect them in order to efficiently process textual data. Tasks include redirecting standard input, standard output and standard error, piping the output of one command to the input of another command, using the output of one command as arguments to another command and sending output to both stdout and a file.

Redirecting standard input, standard output and standard error Pipe the output of one command to the input of another command Use the output of one command as arguments to another command Send output to both stdout and a file

Terms and Utilities:

tee
xargs

IBM: Streams, pipes, and redirects

I/O redirection : using > >> 2>&1 | grep

tutorialLinux: 'tee' - Watch & Log Command Output

tutorialLinux: Shell Features - Pipes and Redirection

Jason Wertz: Intro to xargs

UrbanPenguin: Using xargs in Linux

UrbanPenguin: Redirecting and Piping in Linux

Steven Gordon: Redirection and Pipes: grep, whoami, |, cut

Unix Commands Tutorial for Beginners: Pipes & Redirects, Process Commands and File Attributes

Exercises in I/O redirection and filtering

103.5 Create, monitor and kill processes

Description: Candidates should be able to perform basic process management.

Key Knowledge Areas: Run jobs in the foreground and background Signal a program to continue running after logout Monitor active processes Select and sort processes for display Send signals to processes

Terms and Utilities:

&
bg
fg
jobs
kill
nohup
ps
top
free
uptime
pgrep
pkill
killall
screen

IBM: Create, monitor, and kill processes

UrbanPenguin: Screen

Processes inside out: process types, attributes, life and death etc

BeginLinuxGuru: Systemd Basics - Automatically restart crashed services

System Monitoring : top, iosta, ps, vmstat, lsof

Managing processes:

tutorialLinux: Processes Overview

tutorialLinux: Process Signals

tutorialLinux: State, Niceness, and How to Monitor Processes

tutorialLinux: The /proc Filesystem

Jason Wertz: Managing Processes - performance, load, resources and killing processes

Joe Collins: Linux Tip | How to use Htop

UrbanPenguin: Managing Linux processes with PS and KILL

UrbanPenguin: Managing foreground and background processes

UrbanPenguin: Using top 1

UrbanPenguin: Using top 2

UrbanPenguin: Using nohup to allows jobs to continue on logout

Steven Gordon - Processes: Ctrl-C {kill}, yes, Ctrl-Z {suspend} , jobs, fg, bg, ps, kill, top

103.6 Modify process execution priorities

Description: Candidates should should be able to manage process execution priorities.

Key Knowledge Areas: Know the default priority of a job that is created Run a program with higher or lower priority than the default Change the priority of a running process

Terms and Utilities:

nice
ps
renice
top

IBM: Process execution priorities

UrbanPenguin: Nice and Renice

UrbanPenguin: Using top in Linux

103.7 Search text files using regular expressions

Description: Candidates should be able to manipulate files and text data using regular expressions. This objective includes creating simple regular expressions containing several notational elements. It also includes using regular expression tools to perform searches through a filesystem or file content.

Key Knowledge Areas: Create simple regular expressions containing several notational elements Use regular expression tools to perform searches through a filesystem or file content

Terms and Utilities:

grep
egrep
fgrep
sed
regex(7)

IBM: Search text files using regular expressions

UrbanPenguin: Search text files using regular expressions

UrbanPenguin: Learning SED Introduction to SED and cleaning config files

tutorialLinux: Filtering Output and Finding Things && , cut, sort, uniq, wc, grep

Command Line Basics 8: Using the grep command

UNIX Shell Regular Expressions and the sed and grep commands

UrbanPenguin: Search text files using regular expressions

Steven Gordon - Redirection and Pipes: grep, whoami, |, cut

Linux Leech: head

Linux Leech: pipes

Linux Leech: redirection

Linux Leech: sort

Command Line Basics: Using the grep command

103.8 Perform basic file editing operations using vi

Description: Candidates should be able to edit text files using vi. This objective includes vi navigation, basic vi modes, inserting, editing, deleting, copying and finding text.

Key Knowledge Areas: Navigate a document using vi Use basic vi modes Insert, edit, delete, copy and find text

Terms and Utilities:

vi
/, ?
h,j,k,l
i, o, a
c, d, p, y, dd, yy
ZZ, :w!, :q!, :e!

IBM: File editing with vi

UrbanPenguin: Using vi The basics

Text editors - emacs and vi

Command Line Basics 9: Introduction to Vi/Vim editor

Command Line Basics 10: Editing with Vi/Vim editor

Command Line Basics 11: More Editing with Vi/Vim editor

Free Code Camp: Vim isn’t that scary. Here are 5 free resources you can use to learn it

tutorialLinux: Text Editors - nano and vi - and commands

Opensource.com: Using vi-mode in your shell

Opensource.com: 7 reasons to love Vim

Introduction to Vi/Vim editor

Editing with Vi/Vim editor

More Editing with Vi/Vim editor


Linux Leech: dealing with spaces commands

Linux Leech: wildcards

Linux Leech: wildcard character classes

Linux Leech: Uniq utility

Linux Leech: Permissions explained- symbolic permissions and chmod - part 1

Linux Leech: Permissions explained - part 2 directory permissions

Linux Leech: Permissions explained part 3 - octal and numerical permissions

Linux Leech: Command substitution in Linux using backticks

Linux Leech: Nesting backticks Linux command substitution

Linux Leech: Linux command substitution and nested substitution

Linux Leech: aliases in BASH

Linux Leech: save your BASH aliases

Linux Leech: Redirect terminal output to another terminal


Bash Basics

The Basics of using Bash in Linux with a focus on Ubuntu

Joe Collins: 8 part series

Access and Navigation

Creating & Editing Text Files

Privileges and Permissions

Finding Documentation and Files

User Accounts and Passwords

Managing Software

System Administration Tools

Bash Scripting


Brian Will: Unix terminals and shells


20 Linux commands every sysadmin should know

Opensource


Bash Exercises