Stop being afraid of the terminal

Linux Command Line Reference. A handbook for navigating, files, permissions, pipes, grep, processes and scripts.

37 lessons · 1 hr 40 min of video · 12 quiz questions

Beginner's Guide to the Bash Terminal, by Joe Collins (EzeeLinux)

Try a question from this course

With umask 0022, what permissions does a new directory get?

What you'll be able to do

  • Find your way around the file system and locate files and commands
  • Create, copy, move and delete files safely
  • Read and change permissions and ownership
  • Combine commands with pipes and redirection
  • Search text with grep and shape it with cut, sort and uniq
  • Find and stop processes and manage services

What's in it

  1. Navigating & finding things

    Know where you are, move around, get help, and find files and commands.

    1. Where am I? Prompt, pwd, and absolute vs relative paths
    2. Listing files: ls, hidden files and the long format
    3. Getting help and recalling commands: man, whatis, history
    4. Finding a file or command: locate, find, which
    5. Recap
  2. Working with files

    Create, copy, move, delete and read files, and do it safely.

    1. Creating, copying and moving files and directories
    2. Deleting: rm, rmdir, wildcards and why to be careful
    3. Reading files: cat, less, head, tail, diff, sort
    4. Writing to a file from the shell
    5. Recap
  3. Permissions & ownership

    Read a permission string, change it with chmod and chown, and avoid the common traps.

    1. Reading a permission string (ls -l)
    2. Changing permissions with chmod: symbolic and numeric
    3. Fixing 'permission denied' on a script (execute bit)
    4. chmod -R can lock you out of directories
    5. Changing owner and group with chown (and chgrp)
    6. umask, SUID/SGID/sticky and ACLs
    7. Recap
  4. Pipes & redirection

    Send output to files, feed one command into another, and keep errors straight.

    1. The three streams: stdin, stdout, stderr
    2. Redirecting to files: >, >>, 2>, 2>&1
    3. Pipes: feeding one command into another
    4. Pipes carry only stdout: including errors, tee and /dev/null
    5. Removing duplicates: sort before uniq
    6. Common redirection traps
    7. Recap
  5. grep & text filtering

    Search inside files and shape command output with grep, cut, sort, uniq and wc.

    1. grep basics: searching a file (-i, -n, -c, -v, -w)
    2. Showing context around a match (-A, -B, -C)
    3. Searching many files and folders (-r, -l, wildcards)
    4. grep in a pipeline, and regex flavors
    5. Worked example: counting attackers in auth.log
    6. Recap
  6. Processes, services & system info

    See what is running, stop it, manage services, and check memory and disk.

    1. Finding and stopping a process: ps, top, kill, pkill
    2. Starting and stopping services: systemctl
    3. System info, users and installing software
    4. Recap
  7. Shell scripting essentials

    Run scripts, and write commands that survive spaces and expansion.

    1. What a script rests on
    2. Quoting and expansion: why to quote variables
    3. Recap

Made from these videos

More courses