Skip to content

Instantly share code, notes, and snippets.

@fanpero87
Last active July 28, 2024 11:52
Show Gist options
  • Save fanpero87/4a3235a35dd5f66873b03e008bd890c7 to your computer and use it in GitHub Desktop.
Save fanpero87/4a3235a35dd5f66873b03e008bd890c7 to your computer and use it in GitHub Desktop.
Alias for Linux (Debian/Ubuntu)
## Terminal shortcuts
alias ..="cd ../"
alias ...="cd ../../"
alias ....="cd ../../../"
alias .....="cd ../../../../"
alias ll="ls -alF --color=auto"
alias l="ls -l --color=auto"
alias update="sudo apt update && sudo apt upgrade -y"
alias install="sudo apt install -y"
alias ports="netstat -tulanp"
alias space="df -Th"
alias process="ps faux"
alias reboot='sudo /sbin/reboot'
alias poweroff='sudo /sbin/poweroff'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
## Nginx shortcuts
alias nreload="sudo /usr/local/nginx/sbin/nginx -s reload"
alias ntest="sudo /usr/local/nginx/sbin/nginx -t"
## Laravel shortcuts
alias pat="php artisan tinker"
alias pas="php artisan serve"
alias a="php artisan"
#alias sail="bash vendor/bin/sail"
#alias sail up="./vendor/bin/sail up"
#alias sail shell="./vendor/bin/sail shell"
## Github shortcuts
alias repo="gh repo create"
alias gi="git init"
alias ga="git add -A"
alias gc="git commit -m"
alias gp="git push --set-upstream origin"
@fanpero87
Copy link
Author

fanpero87 commented Apr 13, 2022

Setup alias commands on Linux systems

  1. Modify the default bash file of your user
nano ~/.bashrc
  1. Copy/Paste the shortcuts

  2. Active the file to keep aliases between sessions

source ~/.bashrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment