Files
linux-workspace/doc/cheatsheet.md
2020-09-20 18:02:20 +02:00

57 lines
839 B
Markdown

# List of popular commands and shortcuts
## Bash
### Previous command
```bash
!0 - command itself
!^ - first argument
!$ - last argument
!* - all arguments
!! - full command
```
### Useable commands
```bash
# step back
cd -
sudo su
```
### To explore
```bash
ag
fzf
fd
```
### Script errors
```bash
set -o errexit
set -o nounset
set -o pipefail
```
### Linux
usermod - modifu user account
### Tools
- [ShellCheck](https://github.com/koalaman/shellcheck) A shell script static analysis tool
- [direnv](https://direnv.net/) Directory specific variables
- yq - YAML processor - jq wrapper for YAML documents
- jq - JSON processor
- tldr - basic command usage
- thefuck
## Kubernetes
```bash
# ~/.kube/config
kubectl config get-contexts
kubectl config use-context <context>
```
## AWS
```bash
aws eks update-kubeconfig --name nas
```