FactorPad
Build a Better Process

Linux Cheat Sheet and Command Line Reference

The brain can only remember just so much. So we cheat, and that's not a bad thing.
  1. The challenge - Learning the Linux command line is difficult, but the rewards are great.
  2. Command line - Memorize about 50 commands and find reference material for the rest.
  3. Bookmark - Access go-to resources to stop wasting time searching the Internet.
  4. Structure - Stay organized and you will become a master of the Linux command line.
face pic by Paul Alan Davis, CFA
Updated: February 20, 2021
Skip those one-page pdf cheat sheets. They're too cluttered for the beginner.

Outline Back Tip Next

/ factorpad.com / tech / linux-cheat-sheet.html


An ad-free and cookie-free website.


What's Covered Here?

Beginner

This Linux cheat sheet was originally created for the Linux Essentials course covering 100 commands for the beginner. That tutorial series includes web pages with code examples and links to 3-4 minute videos on our YouTube Channel.

Sections of this Document

The seven sections below include:

  1. A Standard Linux Directory Structure
  2. Commonly Used Wildcards
  3. Metacharacters
  4. Keystroke Combinations
  5. Reserved Words
  6. File and Directory Modes and Permissions
  7. Non-Alphanumeric Characters and Meanings

Linux Cheat Sheet

If we're missing something you'd like to see, reach out to us on social media.

A Standard Linux Directory Structure

Below is a reference to the basic structure of directories for most Linux distributions. Find more at the Linux Filesystem Hierarchy Standard, on Wikipedia.

Commonly Used Wildcards

Linux offers extensive search capabilities using wildcards and the following characters are frequently used.

Metacharacters

These 10 metacharacters have special meaning to the bash shell program and must be quoted with ' or " to not be interpreted as metacharacters.

space  tab  newline  |  &  ;  (  )  <  >

Keystroke Combinations

These keystroke combinations are helpful in the bash shell.

Reserved Words

Reserved words are commonly used for looping and conditional constructs when writing functions and scripts.

File and Directory Modes and Permissions

Permissions can be set with any one of three modes: octal, binary and mode.

Octal Binary Mode
0 000 ---
1 001 --x
2 010 -w-
3 011 -wx
4 100 r--
5 101 r-x
6 110 rw-
7 111 rwx

Non-Alphanumeric Characters and Meanings

The following 32 non-alphanumeric characters have special meaning in the bash shell depending on context. The Context Key below is used to cross-reference the context under which each character has special meaning. See GNU Bash Manual for more complete information.

Symbol Name(s) Context
` backtick I
~ tilde M
! exclamation, bang O, S
@ ampersand, at symbol H, O
# number, pound, sharp, hash B, H
$ dollar symbol H, I, L, O, Q, S
% percent J, H, U
^ caret H, J
& ampersand, and symbol D, J
* asterisk, star J, H, L, O
( open parenthesis H, J, S
) close parenthesis H, J, S
_ underscore (no special meaning)
- dash, minus, hyphen J, M, O, S, U
+ plus J, O, P, U
= equal J, Q, R, S
| pipe, vertical bar D, J
\ backslash I, T
/ forward slash J, H, M
{ open brace, curly bracket F, H, S
} close brace, curly bracket D, H, L, O, S
[ open bracket D, H, L, O, S
] close bracket D, H, L, O, S
" quote, double quote A, P, S, T
' apostrophe, single quote A, O, P, S, T
: colon C, F, H, S, T
; semi-colon E, S
? question mark O
< less than D, N
> greater than D, N
. period, dot C, M
, comma J
Context Key
  1. quoting
  2. comments
  3. command shortcuts
  4. redirection
  5. compound commands
  6. brace expansion
  7. tilde expansion
  8. parameter and variable expansion
  9. command substitution
  10. arithmetic expansion
  11. word splitting
  12. filename expansion
  13. directories
  14. process substitution
  15. pattern matching
  16. command options
  17. environment
  18. variables
  19. expessions
  20. escape sequences
  21. job control

Related Content


What's Next?

The FactorPad YouTube Channel is growing every day. Don't miss out. Subscribe now. Also, follow @factorpad on Twitter if that's how you like reminders, or try out our no-spam email list.

Outline Back Tip Next

/ factorpad.com / tech / linux-cheat-sheet.html


linux cheat sheet
linux command line
linux video tutorial
find help on linux
linux directory hierarchy
linux keywords
linux characters
linux bash
linux special characters
linux reserved words
linux keystroke combinations
linux command line reference
linux metacharacters
linux modes and linux permissions

A newly-updated free resource. Connect and refer a friend today.