Learning Terminal
This section contains resources for learning how to use the MacOS Terminal and related Linux Terminals.
Note this is a living document and is constantly being updated. Some things may come and go over time.
Beginner¶
To see hidden files on your system (Open Terminal and type):
- To show all files:
defaults write com.apple.finder AppleShowAllFiles YES - To hide all files:
defaults write com.apple.finder AppleShowAllFiles NO
Tips:
- You can drag and drop a folder from the Finder into the Terminal and see the path. This makes it easy to navigate (via
cd) to a folder without typing the whole path in. You want to be aware of file paths and using spaces in file names and directories. Its much easier to always use no spaces. See: Spaces in file and directory names for more info.
Command Line¶
- Getting to Know the Command Line
- Codeacademy: Learn the Command Line
- The Art of the Command Line - Master the command line, in one page. A 64K+ starred repo on github. Worth the time and bookmark.
Quick Cheat Sheet¶
Ctrl + U: Clear the current lineCtrl + A--->Ctrl + K: Move to start of line and clear lineCtrl + C: Cancel the current commandCtrl + Y: Recall the deleted lineCtrl + A: Move to the beginning of the line
UNIX / Linux / Terminal Cheat Sheets¶
- Command Line Cheat Sheet by git-tower - This one is great!
- MacOS/Linux/Unix Command Line Cheat Sheet
- List of Command Line Commands
- An A-Z Index of the Apple macOS command line (OS X)
- Basic UNIX Commands
- UNIX / Linux Cheat Sheet
Bash Shell¶
- What is the bash shell?
- bash guide for beginners
- bash startup files (aka "dotfiles" - .bash_profile, .profile, etc)
- An introduction to Dotfiles: how to take control of your development environment
- How to make your Dotfile management a painless affair
- Getting Started with BASH
Customizations¶
- RJ's Bash Profile
- Nathaniel Landau's Bash Profile
- Awesome macOS Command Line - Huge list of macOS actions via command line.
- 30 Mac Terminal Commands to Access Hidden Features
Bash Scripting¶
- What is a Bash Script?
- bash scripting cheatsheet
- Logical, arithmetical and comparison operators
- pure bash bible - A collection of pure bash alternatives to external processes.
- Nathaniel Landau's Bash Scripting Utilities
Aliases¶
Bash Tweaks (UI, Color, etc)¶
- Tutorial: Customize Your Terminal OG Style — No Libraries or Plugins!
- FLOZz' MISC » bash:tip_colors_and_formatting
- How to Customize the Command Prompt
Files¶
Text Editing with vi (vim)¶
Cheat Sheets¶
Permissions¶
Encoding¶
Workflow Enhancements¶
Intermediate¶
Terminal Emulators¶
MacOS / Linux¶
Windows¶
Terminal Multiplexers¶
screen¶
tmux¶
Getting Started
- A Gentle Introduction to tmux
- A Tmux Primer
- A Quick and Easy Guide to tmux
- The Tao of tmux - Go deep with this ebook.
- tmux shortcuts & cheatsheet
Customizing Tmux