> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ahmadraza.in/llms.txt
> Use this file to discover all available pages before exploring further.

# CustomTerminal

# Useful CLI Customizations & Shortcuts for Daily Work

## Customizing Bash Prompt

Edit `~/.bashrc` and add the following line to enhance your terminal prompt with useful information:

```bash theme={null}
PS1='\[\033[0;31m\]\u@\h\[\033[0m\]@\[\033[1;33m\]\A\[\033[0m\]@\[\033[1;32m\]$(free | awk '\''/Mem:/ {printf "%.2f%%", $3/$2 * 100.0}'\'')\[\033[0m\]@ \[\033[1;34m\][~]\[\033[0m\] \[\033[1;34m\]\w\[\033[0m\] $(git branch 2>/dev/null | grep -e "^\*" | sed "s/*/(/" | sed "s/$/)/")\n\[\033[1;37m\]# \[\033[0m\]'
```

### Features:

* Shows username, hostname, and current time
* Displays RAM usage percentage dynamically
* Shows current working directory and active Git branch

## Kubernetes Shortcuts (Aliases)

Add the following aliases in `~/.bashrc` or `~/.zshrc` to speed up Kubernetes operations:

```bash theme={null}
alias k='kubectl'
alias kgp='kubectl get pods'
alias kgs='kubectl get services'
alias kgn='kubectl get nodes'
alias kd='kubectl describe'
alias kdp='kubectl delete pod'
alias kctx='kubectl config use-context'
alias kns='kubectl config set-context --current --namespace'
```

## Terraform Shortcuts

```bash theme={null}
alias tf='terraform'
alias tfi='terraform init'
alias tfp='terraform plan'
alias tfa='terraform apply'
alias tfd='terraform destroy'
```

## Docker Shortcuts

```bash theme={null}
alias d='docker'
alias dps='docker ps'
alias dpa='docker ps -a'
alias di='docker images'
alias drm='docker rm'
alias drmi='docker rmi'
alias dexec='docker exec -it'
alias dlog='docker logs'
```

## Git Shortcuts

```bash theme={null}
alias gs='git status'
alias ga='git add .'
alias gc='git commit -m'
alias gp='git push'
alias gl='git log --oneline --graph --decorate'
alias gco='git checkout'
alias gb='git branch'
```

## General Productivity Aliases

```bash theme={null}
alias cls='clear'
alias ..='cd ..'
alias ...='cd ../..'
alias l='ls -lah'
alias la='ls -A'
alias ll='ls -alF'
alias c='clear && ls'
```

### Applying Changes

After adding these to your shell configuration file, apply the changes:

```bash theme={null}
source ~/.bashrc  # for Bash
source ~/.zshrc   # for Zsh
```
