56 lines
885 B
Markdown
56 lines
885 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
|
|
- ag
|
|
- fzf
|
|
- fd
|
|
- [vim -plug](https://github.com/junegunn/vim-plug)
|
|
|
|
### 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
|
|
```
|
|
|