Linux Command Line

Table of Contents

The Linux Command Line is a key part of the Linux Operating System. Learn how to use the bash command line effectively in our beginner's tutorial.



  1. Basic Commands
  2. Learn fundamentals commands for the Command Line.

    1. Setting up your Command Line Interface
    2. Learn how to efficiently use the command line. Here, we'll look at how to set up your command line interface whether you're coming from a OS X, Windows or Linux platform.


    3. Introduction to the Shell
    4. Introduction to the Shell.


    5. Command Structure
    6. Learn how commands are formed before entering them into the command line.


    7. The Linux File System
    8. Learning what a file system is, and navigating through with cd.


    9. Navigating the File System
    10. Learn how to navigate the file system using the cd (change directory) command.


    11. Listing Files with ls
    12. Learn how to list the hidden contents of a file system with ls.


    13. Copying Files and Directories with cp
    14. Learn how to copy files on the command line.


    15. Moving and Renaming Files and Directories with mv
    16. Learn how to move and rename files on the command line.


    17. Managing files & directories
    18. How to make and delete files and directories with mkdir, touch and rm.



  3. Intermediate Commands
  4. Learn Intermediate concepts of the Unix Command Line.

    1. Efficient Cursor Movements
    2. Work like a command like professional by learning the keyboard shortcuts on the command line.


    3. Command Help
    4. How to ask the command line directly for help when you need it! We will go over man, apropos and the which commands.


    5. Using aliases to expedite your workflow
    6. Learn how to use the alias command to create shortcuts of multiple commands.


    7. Using cat to view and create files
    8. Learn how to read from and write to files using cat.This lesson will also go over appending.


    9. Reading files with less and more
    10. Learn how to read files with less and more.


    11. Redirections
    12. How to redirect standard error, input and output using the command line.


    13. Pipelining
    14. Learn how to use pipelining and some of the most powerful commands used with pipelining like wc, head, tail, grep, uniq, sort and tee.


    15. Globbing: simplifying tasks with wildcards
    16. Learn how you can use wildcards and globbing on the command line. Find out how to use the asterisk (*) and question mark (?) symbols to simplify tasks.


    17. Expansions with echo
    18. Learn about arithmetic, pathname and brace expansions.


    19. Single and Double Quotes
    20. Learn the difference between single and double quotes in the Shell.


    21. Creating Hard and Symbolic Links with ln
    22. Ever found yourself confused about soft and hard links on the unix command line? Learn the difference here, and how they can be useful.


    23. History to look back on Commands
    24. Learn how to navigate and direct your shell history.



  5. Permissions
  6. Learn about permissions in the UNIX and Linux environment.

    1. File and Directory Permissions
    2. Learn all about UNIX / Linux permissions and how to manipulate them to achieve security.


    3. File Accession: read write and execute
    4. Learn the three types of file accession: read, write and execute.


    5. Using chmod to set file permissions
    6. Learn how to change read, write, and execute with chmod on the Linux Command Line.


    7. Setting umask to mask permissions
    8. Learn how to use umask to set default file permission settings.


    9. Changing file permissions with chown
    10. Learn how to grant file access to other people with chown.


    11. Using sudo and su and their differences
    12. Learn how to switch users and run administrative tasks on the Linux command line with the sudo and su.



  7. Environment
  8. Learn all about your Linux shell environment - including variables, startup files and customization.

    1. Unix Shells
    2. Learn the different types of shells including tcsh, csh, zsh and bash.


    3. Shell and Environment Variables
    4. Learn about the shell and environment variables including how to use the printenv, env and set commands.


    5. Bash startup files
    6. Learn the different startup files that run when bash starts up. We'll cover what /etc/profile, .bash_profile, .bash_rc, .bash_login and .profile are for.


    7. Setting environment variables
    8. Learn how to set up the various environment variables on the command line. We'll go over how to use the export and source commands and setting the PATH variable to persist.


    9. Customizing the prompt
    10. Learn how to customize your prompt to suit your own preferences. We'll go over setting your $PS1 variable.



  9. Searching
  10. Learn how to use the linux search box right from the command line.

    1. Locating files with locate
    2. Learn how to use the locate command to search for files in your linux environment.


    3. Finding files with find
    4. Learn how to find files and directories with the find command.



  11. Processes
  12. Learn how to display tasks, list jobs, and send signals to processes on the Unix Command Line.

    1. What is a Unix Process?
    2. Learn what a process is and how Unix organizes them.


    3. Viewing Processes with ps
    4. Learn how to view processes with the ps command and its x option. Learn what PID, TT, STAT variables mean.


    5. Dynamically Viewing Processes
    6. Learn how to dynamically view Unix processes with the top command. Also learn what load average, %us, %sy, %ni, %wa, mem and swap mean.


    7. Background and Foreground
    8. Learn how to send a process to the background, or bring it back to the foreground. Also learn about the jobs command.


    9. Sending Signals to Processes
    10. Learn how to pause and stop processes with kill, along with how to use commands HUP, INT, QUIT, KILL, SEGV, TERM, CONT, STOP TSTP and WINCH to send signals to processes.


    11. Managing priorities and niceness
    12. Learn how to manage linux process priorities with the nice and renice commands.



  13. Archiving & Compression
  14. Learn how to archive files and folders for backup by using compression commands gzip, tar, bzip2, zless, and zcat in Unix.

    1. What is compression?
    2. Learn what compression is, how it works, and the two types of compressions - lossy and lossless.


    3. Using gzip, gunzip for file compression
    4. Learn how to use gzip and gunzip, used for file compressions. Also learn helper commands zcat and zless.


    5. Compressing multiple files with tar, zip and unzip
    6. Learn how to archive and bundle files and folders together with tar, unzip and zip.


    7. Using cpio
    8. Learn how to use the cpio utility to archive files.



  15. Regular Expressions
  16. Learn how to use POSIX regular expressions with grep via the Linux Command Line.

    1. Introduction
    2. What are regular expressions (regex)? What is the linux command line's POSIX standard to regex?


    3. Literal and Special Characters
    4. Learn about literal characters and special (meta) characters. We'll have an overview look at both Basic Regular Expressions (BRE) and Extended Regular Expressions (ERE).


    5. Matching Single Characters
    6. Learn how you can use Basic Regular Expressions to match single characters with a period, literal character, an escape key, or bracket expansion.


    7. Bracket Expressions
    8. Learn how you can use bracket expressions to specify from a group of characters. Additionally, we'll go over portability issues, character classes, and non-English environments.


    9. Matching Multiple Characters
    10. Learn how to match multiple characters with the wildcard symbol and braces.


    11. Backreferences and Anchors
    12. Learn how you can reference an earlier character set with backreferences. Also learn about anchors, which are useful for specifying when some text should come at the beginning or end of a regular expression.


    13. Extended Regular Expressions
    14. Learn additional features made available by extended regular expressions.



  17. Text Processing
  18. Learn the commands used to manipulate and edit text on the Unix Command Line. We will go over commands such as cat, sort, uniq, cut, paste, join, expand, unexpand, column, colrm, tr, cmp, comm, diff, patch, aspell and lookup.

    1. Cat Revisited
    2. Here, we'll take another look at cat and use this command to see non-printing characters. Additionally, we'll look at converting between UNIX and DOS file formats, viewing line numbers and suppressing blank lines.


    3. Sorting
    4. Take a deeper look into the sort command, with its various ways of sorting and specifying fields. Learn the options used to sort multiple files at once, merging pre-sorted files, specifying delimiters, fields, subfields, and ignoring blank spaces.


    5. Finding Unique or Duplicate elements
    6. After a quick sort, we can use the uniq command to find duplicates or unique items. We can also find the occurrence of each record.


    7. Cutting, Pasting and Joining
    8. Learn how to cut from columns, paste two segments together, and join relations with a common attribute.


    9. Spaces to Tabs, Tabs to Spaces
    10. Learn how to go from spaces to tabs and vice versa with the expand and unexpand commands.


    11. Column Formatting and Pretty Printing
    12. Learn the commands essential for pretty printing. We'll go over the column command, which converts an input into a nice, columnated table, the colrm command, which removes any unwanted columns, and the fold command, which allows you to control how wide ea


    13. Transliterating text
    14. Learn how to replace all characters from standard in with a single two-lettered command - tr.


    15. Comparing text
    16. Learn the various ways that you can compare text on the Linux Command Line. Use cmp and comm to compare and see differences, and use the patch command to update a text file.


    17. Finding differences with diff
    18. Learn how to find changes between two files on the Unix Command Line with the diff command.


    19. Patching from a diff file
    20. Learn how to update a file with a simple patch command.


    21. Spell checking and dictionary lookup
    22. Learn how to run a spell check on your text files, and look up works in a dictionary with the aspell and lookup commands.



  19. Cron Jobs
  20. Learn how to use cron to setup cron jobs on Ubuntu, or any other distro through our Linux tutorial.

    1. What is Cron?
    2. Learn what the cron daemon is, practical applications of a cron job, and examples of cron tasks. Also learn how the crontab command works.


    3. Configuring and scheduling crontabs
    4. Learn the anatomy of a crontab - the variables declared up top, and the ways you can schedule specific commands to be triggered. Also learn how to configure and schedule each command.


    5. Handling output
    6. Find out how to handle output - whether you want to email results to yourself or others, or if you want to trash the output. Also learn how to create a log file containing all outputs of your cronjobs.



  21. Secure Shell Access (SSH)
  22. Learn about Secure Shell Access (SSH), private and public keys, SCP, and all other topics related to the ssh command in our beginner's tutorial.

    1. Introduction
    2. Introduction to SSH, how it's better than telnet and basic ssh commands.


    3. SSH Keys: RSA and DSA
    4. Learn about SSH public and private keys, along with the most widely used key types - RSA and DSA. Also learn how to easily copy your public key to a host server with the ssh-copy-id command.


    5. SSH Agent and SSH Add
    6. Learn how to use the SSH agent daemon and the ssh-add command to manage your SSH keys and passphrases.


    7. Secure Copying (SCP)
    8. Learn how to use the scp command to upload and download files from remote hosts.



  23. Terminal Multiplexer (tmux)
  24. Learn how to install and use tmux, a terminal multiplexer, in our beginner's guide tutorial.

    1. Introduction and Installation
    2. Learn what the hype is about with tmux, and how to install it on OS X, Debian or RedHat systems.


    3. Pane Management
    4. Learn how to split windows into panes horizontally and vertically, along with other commands that will enable you to resize, rotate and close panes on tmux.


    5. Window Management
    6. Learn how to attach and detach windows, along with creating, killing, and listing windows.


    7. Sessions
    8. Learn how to create, manage and delete tmux sessions.


    9. Customizing and Installing Plugins
    10. Learn how to customize tmux to your liking, and also find out how to install plugins!



  25. Day-to-day tasks
  26. Learn how you can use the Linux Command Line in practical day-to-day tasks

    1. Cooking the perfect steak via the command line
    2. Ever wondered how you would execute common tasks via the Linux Command Line? In this tutorial, we'll show you how to cook a perfect medium-rare steak using a command line interface.


    3. Modifying permission rights to access Pokémon cards via the command line
    4. Learn how to use Unix Permissions to modify your parents' access rights to buy Pokémon Cards.


    5. Finding a cute girlfriend via the command line
    6. Extend your command line prowess by finding yourself a cute girl using the unix command line.


    7. How to obtain freedom
    8. Learn about the history of Linux and how the collective efforts of Richard Stallman, Linus Torvalds and others were able to obtain freedom through the Linux Operating System.