Bash Aliases
Aliases are defined indot_bash_aliases.tmpl and are automatically loaded by bash.
Basic Navigation
Simple shortcuts for common commands.| Alias | Command | Description |
|---|---|---|
ll | ls -l | Long listing format |
.. | cd .. | Go up one directory |
... | cd ../.. | Go up two directories |
tailf | tail -f | Follow log file output |
Network Utilities
Network diagnostics and information.| Alias | Command | Description |
|---|---|---|
myip | curl -s ipinfo.io/ip | Show public IPv4 address |
myipv6 | curl -s ifconfig.me | Show public IPv6 address |
ports | ss -puntl | List all open ports |
psgrep | ps aux | grep | Search running processes |
netgrep | ss -puntl | grep | Search open ports |
Safety Aliases
Interactive prompts for destructive operations.| Alias | Command | Description |
|---|---|---|
rm | rm -I | Prompt before removing 3+ files or recursive |
cp | cp -i | Prompt before overwrite |
mv | mv -i | Prompt before overwrite |
ln | ln -i | Prompt before overwrite |
-Iflag: Less intrusive than-i, only prompts for 3+ files or recursive delete-iflag: Interactive mode, prompts before each overwrite
System Utilities
Enhanced system commands with better defaults.| Alias | Command | Description |
|---|---|---|
grep | grep --color=auto | Colorize grep output |
fgrep | fgrep --color=auto | Colorize fixed-string grep |
egrep | egrep --color=auto | Colorize extended grep |
h | history | Show command history |
j | jobs -l | List background jobs |
c | clear | Clear terminal screen |
df | df -h | Human-readable disk space |
du | du -h | Human-readable directory sizes |
free | free -h | Human-readable memory info |
Git Aliases
Shortcuts for common git operations.| Alias | Command | Description |
|---|---|---|
gs | git status | Show working tree status |
gco | git checkout | Switch branches or restore files |
gcm | git commit -m | Commit with message |
gps | git push | Push changes to remote |
gpl | git pull | Fetch and merge changes |
gb | git branch | List, create, or delete branches |
gd | git diff | Show changes |
gl | git log --oneline | Compact log view |
ga | git add | Add files to staging |
git_clean_branches | Complex | Remove merged branches |
- Removes stale remote branches
- Finds all merged local branches
- Excludes current branch (
*) - Deletes each merged branch
Package Manager (Linux)
Convenient apt shortcuts (only on Linux systems).| Alias | Command | Description |
|---|---|---|
install | sudo apt install | Install packages |
update | sudo apt update | Update package lists |
upgrade | sudo apt upgrade | Upgrade installed packages |
search | apt search | Search for packages |
show | apt show | Show package details |
Other Utilities
| Alias | Command | Description |
|---|---|---|
backup | rsync -av --progress | Backup files with progress |
WSL-Specific Aliases
These aliases are only loaded when running in Windows Subsystem for Linux (WSL). Detection:Windows Interop
Direct access to Windows executables from WSL.| Alias | Command | Description |
|---|---|---|
cmd | cmd.exe /c | Run Windows Command Prompt commands |
powershell | powershell.exe | Launch PowerShell |
pwsh | pwsh.exe | Launch PowerShell Core |
explorer | explorer.exe | Open Windows Explorer |
notepad | notepad.exe | Open Notepad |
open | explorer.exe | Open files/folders in default app |
Quick Windows Paths
Navigate to common Windows directories.| Alias | Path | Description |
|---|---|---|
cdwin | /mnt/c/Users/{username} | Windows user home |
cddownloads | /mnt/c/Users/{username}/Downloads | Downloads folder |
cddesktop | /mnt/c/Users/{username}/Desktop | Desktop folder |
cddocuments | /mnt/c/Users/{username}/OneDrive/Documentos | Documents folder |
cdhome | /home/{username} | WSL home directory |
Work-Specific (WSL)
Only available whenmachine_type is “work” or “hybrid”.
| Alias | Command | Description |
|---|---|---|
work-explorer | explorer.exe {work_path} | Open work folder in Explorer |
cdwork | cd {work_repos_path} | Navigate to work repositories |
Personal-Specific (WSL)
Only available whenmachine_type is “personal” or “hybrid”.
| Alias | Command | Description |
|---|---|---|
cdrepos | cd {personal_repos} | Navigate to personal repos |
personal-explorer | explorer.exe {repos_path} | Open repos in Explorer |
Bash Functions
Custom bash functions defined indot_bash_functions.
aws_env
Switch between AWS CLI profiles and export credentials as environment variables.
Signature:
- Lists all available AWS profiles
- Checks if requested profile exists
- Reads credentials from
~/.aws/credentials - Exports environment variables:
AWS_PROFILEAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGION
- Displays all AWS environment variables
bw_unlock
Unlock Bitwarden vault and export session token.
Signature:
- Prompts for master password
- Unlocks vault and gets session token
- Exports
BW_SESSIONenvironment variable - All subsequent
bwcommands use this session
bw_status
Check current Bitwarden vault status.
Signature:
unauthenticated- Not logged in (runbw login)locked- Logged in but vault is locked (runbw_unlock)unlocked- Vault is unlocked and ready to use
Loading Order
~/.bashrcsources~/.bash_aliases~/.bash_aliasescontains all aliases~/.bash_functionsis sourced by bashrc- Functions become available in all new shells