```text
__ __ _ _ _
| \/ | ___ __| | ___ _ __ _ __ | (_)_ __ _ ___ __
| |\/| |/ _ \ / _` |/ _ \ '__| '_ \ | | | '_ \| | | \ \/ /
| | | | (_) | (_| | __/ | | | | | | | | | | | |_| |> <
|_| |_|\___/ \__,_|\___|_| |_| |_| |_|_|_| |_|\__,_/_/\_\
_ _ _ _
___| (_) | |_ ___ ___ | |___
/ __| | | | __/ _ \ / _ \| / __|
| (__| | | | || (_) | (_) | \__ \
\___|_|_| \__\___/ \___/|_|___/
```
---
## Target audience
- linux desktop CLI users
- linux admins
```text
__________________________________________
/ This is the year of linux on the desktop \
| |
| ...Windows10 has WSL ;-) |
\ /
------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
```
---
## Linux tooling philosophy
- **do one thing (and only one thing!) well**
- **chaining**
- _sound familiar? (hint: functional programming...)_
---
## Why? Improvements to...
- **productivity**
- **optics**
- "unix porn" (`PS1`, `ls`, ...)
---
## Learn the basics
- `emacs` and `vim`
- learn navigation, copy & paste, (and how to exit :thumbsup:)
- pick one and become fluent
- `cd`, `ls`, `cat`, `less`, `find`, `grep`, `sed`, `tail`, `awk`, `dd`, `rsync`, ...
- Combine using pipes ( `|` ) and redirection ( `>` )
---
## terminals and shells
### What is the difference between **terminal** and **shell**?
```text
+--------------------+
| "terminal" |
+--------------------+
| |
| +--------------+ |
| | | |
| | "shell" | |
| | | |
| +--------------+ |
| |
+--------------------+
```
---
## terminals and shells
### terminal
- **colors** (16 or more), **fonts** (utf8, ligatures, ...)
- **interactions**
- keyboard shortcuts
- mouse interaction (copy & paste, scrolling, selection, ...)
### shell
- **everything else** (f.ex. **`PS1`**, scripting language)
---
## terminal
### What is the best terminal?
- use your default
### Unicode, Emojis, Fonts, Image support (!)
- but think about enriching your output!
- Emojis: :thumbsup: :ballot_box_with_check: :collision: :v: :poop: :speech_balloon: :zap: € ★ :star:
---
## shell
- bash
- zsh
- fish
- dash (embedded)
---
### shell / zsh
- https://www.zsh.org/
- package manager
- oh-my-zsh (151k stars) https://ohmyz.sh
- category: shell
---
### shell / fish: The new kid on the block
- https://fishshell.com
- package manager
- fisher (6.1k stars) https://github.com/jorgebucaran/fisher
- oh-my-fish (8.8k stars) https://github.com/oh-my-fish/oh-my-fish
- category: shell
---
### shell / bash
- https://www.gnu.org/software/bash/
- package manager
- bash-it (13.2k stars) https://github.com/Bash-it/bash-it
- oh-my-bash (3.5k stars) https://ohmybash.github.io
- category: shell
---
### shell / PS1
PS1: alias for "prompt"
- default: `username:/some/location$`
- `$PWD` present working directory
Extra, nice-to-have information
- only show relevant parts (hide user/machine name on local machine)
- compact location ( $PWD )
- git status
- environment infos (node / .NET / Java / Python / etc version)
---
### shell / PS1: liquidprompt
simple prompt
- 4.2k stars https://github.com/nojhan/liquidprompt
- shortens `$PWD`
- adds git status
- available for `zsh`, `bash`, etc
- category: unix-porn
---
### shell / PS1: Powerline
started as fancy statusline for vim …
- 11k stars https://github.com/powerline/powerline
- started as fancy statusline for `vim`...
- shortens `$PWD`
- adds git status
- available for `zsh`, `bash`, etc
- category: unix-porn
---
### shell / PS1: Starship
the new kid on the block
- 16k stars https://github.com/starship/starship
- cross-plattform, cross-shell
- stylish
- great defaults for many environments
- easy to configure
- category: unix-porn
---
## tldr
- 41k stars https://tldr.sh/
- man pages can be difficult
- tldr: implemented in many languages (js, ruby, python, perl, haskell, etc)
- Demo: `ln`, `tar`, `scp`
---
## McFly
- 4.5 stars https://github.com/cantino/mcfly
- category: history search
> McFly replaces your default `Ctrl R` shell history search with an intelligent search engine that takes into account your working
directory and the context of recently executed commands. McFly’s suggestions are prioritized in real time with a small neural network
---
## thefuck
fix common typos / mistakes
- 51k stars https://github.com/nvbn/thefuck
- example: pushing a newly created git branch
- category: productivity
---
### The GNU Midnight Commander
[mc](http://midnight-commander.org/) is a visual shell much like a file manager, only with many more features
- text mode application, but it also includes mouse support
- best [features](https://www.uibk.ac.at/th-physik/howto/mc.html) are its ability to FTP, view tar and zip files, and to poke into tar, ar, deb, zip, cpio, lha and rar for specific files
---
## bat
`cat` & `less` with syntax highlighting
- 37.6k stars https://github.com/sharkdp/bat
_bat looks good on a dark background by default. However, if your terminal uses a light background, some themes like GitHub or OneHalfLight will work better for you._
- category: read / file display
---
## ripgrep
very fast `grep` replacement
- 33.7k stars https://github.com/BurntSushi/ripgrep
- `ripgrep` recursively searches directories for a regex pattern
- sensible defaults: respect `.gitignore`, ignores hidden files & folders
- command: `rg`
- use `rg hidden g '!.git' "your search"` to search all hidden folder except .git
- category: search
---
## ripgrep-all
ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, sqlite (!), etc
- 5k stars https://github.com/phiresky/ripgrep-all
- command: `rga`
- faster than `pdfgrep` (see website for a benchmark)
- category: search
- Demo: search in Manning books folder
---
## fzf
interactive fuzzy search
- 47.5k stars https://github.com/junegunn/fzf
- pipe any line based input to fzf: Example `find * -type f | fzf`
- good integration with other tools
- nice helper methods for
- files & directories `cd **