Skip to content

Instantly share code, notes, and snippets.

@yactouat
Last active October 6, 2022 08:51
Show Gist options
  • Save yactouat/f5014f3c72fd50ccec509aed19ef738c to your computer and use it in GitHub Desktop.
Save yactouat/f5014f3c72fd50ccec509aed19ef738c to your computer and use it in GitHub Desktop.
Ubuntu bash aliases
# env vars
## AWS
export AWS_CONFIG_FILE=~/.aws/config
export AWS_ACCESS_KEY_ID="some_access_key"
export AWS_DEFAULT_REGION=eu-central-1
export AWS_SECRET_ACCESS_KEY="some_secret_key"
export AWS_SHARED_CREDENTIALS_FILE=~/.aws/credentials
# aliases
## Apache stuff
alias stopapache='sudo systemctl stop apache2'
## AWS stuff
alias awsregion='cat $AWS_CONFIG_FILE'
## bash stuff
alias bashhistory='code ~/.bash_history'
alias bashrc='code ~/.bashrc'
## Docker stuff
alias dockerprune='docker system prune --volumes --force'
alias dockerreset='sleep 2 && clear && docker compose down && docker system prune --volumes --force && docker compose up --build --force-recreate'
### MySQL stuff
alias stopmysql='sudo systemctl stop mysql'
## PHP stuff
export PATH="/usr/bin/php:$PATH"
## Python stuff
alias _py='python3'
# running commands on startup
stopapache
stopmysql
## this allows me to quickly add identities with an `ssh-add <private-key>`
eval "$(ssh-agent -s)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment