Last active
August 13, 2025 10:39
-
-
Save Anasxrt/9eb1cb01e9ccf0826e1f786dfe29ac29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Cloudways Shell Aliases for Real-World Productivity | |
| # | |
| # Cloudways SSH environments come with a bare-bones shell—no 'll', no 'la', | |
| # and no aliases for tools like `git`, `wp`, or even basic navigation. | |
| # For developers, sysadmins, and anyone managing WordPress or Laravel setups, | |
| # this means extra keystrokes and slower workflows. | |
| # | |
| # The aliase is base from oh-my-zsh, but I have removed the comments and the aliases that are not useful for me. | |
| # | |
| # This file contains a curated set of bash aliases that cover: | |
| # - Directory traversal (e.g., ..., ...., -, 2–9) | |
| # - sudo shorthand (_) | |
| # - popular Linux commands: ll, la, grep | |
| # - wp-cli and git enhancements | |
| # | |
| # You’re welcome to fork or comment. | |
| # | |
| # Quick Install — Aliases Only, No Comments: | |
| # cd ~ && curl -s https://gist.github.com/Anasxrt/9eb1cb01e9ccf0826e1f786dfe29ac29/raw | tee .bash_aliases_raw | grep '^alias' > .bash_aliases && rm -f .bash_aliases_raw && sed -i 's/\r$//' .bash_aliases && source .bash_aliases | |
| alias -- -='cd -' | |
| alias ..='cd ../' | |
| alias ...='cd ../..' | |
| alias ....='cd ../../..' | |
| alias .....='cd ../../../..' | |
| alias ......='cd ../../../../..' | |
| alias .3='cd ../../../' | |
| alias .4='cd ../../../../' | |
| alias .5='cd ../../../../../' | |
| alias .6='cd ../../../../../../' | |
| alias cd..='cd ../' | |
| alias 1='cd -' | |
| alias 2='cd -2' | |
| alias 3='cd -3' | |
| alias 4='cd -4' | |
| alias 5='cd -5' | |
| alias 6='cd -6' | |
| alias 7='cd -7' | |
| alias 8='cd -8' | |
| alias 9='cd -9' | |
| alias _='sudo ' | |
| alias afind='ack -il' # not default install | |
| alias c='clear' | |
| alias ds='dirs -v' | |
| alias egrep='grep -E' | |
| alias fgrep='grep -F' | |
| alias fix_stty='stty sane' | |
| alias fix_term='echo -e "\033c"' | |
| alias g=git | |
| alias ga='git add' | |
| alias gaa='git add --all' | |
| alias gam='git am' | |
| alias gama='git am --abort' | |
| alias gamc='git am --continue' | |
| alias gams='git am --skip' | |
| alias gamscp='git am --show-current-patch' | |
| alias gap='git apply' | |
| alias gapa='git add --patch' | |
| alias gapt='git apply --3way' | |
| alias gau='git add --update' | |
| alias gav='git add --verbose' | |
| alias gb='git branch' | |
| alias gbD='git branch --delete --force' | |
| alias gba='git branch --all' | |
| alias gbd='git branch --delete' | |
| alias gbg='LANG=C git branch -vv | grep ": gone\]"' | |
| alias gbgD='LANG=C git branch --no-color -vv | grep ": gone\]" | cut -c 3- | awk '\''{print $1}'\'' | xargs git branch -D' | |
| alias gbgd='LANG=C git branch --no-color -vv | grep ": gone\]" | cut -c 3- | awk '\''{print $1}'\'' | xargs git branch -d' | |
| alias gbl='git blame -w' | |
| alias gbm='git branch --move' | |
| alias gbnm='git branch --no-merged' | |
| alias gbr='git branch --remote' | |
| alias gbs='git bisect' | |
| alias gbsb='git bisect bad' | |
| alias gbsg='git bisect good' | |
| alias gbsn='git bisect new' | |
| alias gbso='git bisect old' | |
| alias gbsr='git bisect reset' | |
| alias gbss='git bisect start' | |
| alias gc='git commit --verbose' | |
| alias gc!='git commit --verbose --amend' | |
| alias gcB='git checkout -B' | |
| alias gca='git commit --verbose --all' | |
| alias gca!='git commit --verbose --all --amend' | |
| alias gcam='git commit --all --message' | |
| alias gcan!='git commit --verbose --all --no-edit --amend' | |
| alias gcann!='git commit --verbose --all --date=now --no-edit --amend' | |
| alias gcans!='git commit --verbose --all --signoff --no-edit --amend' | |
| alias gcas='git commit --all --signoff' | |
| alias gcasm='git commit --all --signoff --message' | |
| alias gcb='git checkout -b' | |
| alias gcd='git checkout $(git_develop_branch)' | |
| alias gcf='git config --list' | |
| alias gcfu='git commit --fixup' | |
| alias gcl='git clone --recurse-submodules' | |
| alias gclean='git clean --interactive -d' | |
| alias gclf='git clone --recursive --shallow-submodules --filter=blob:none --also-filter-submodules' | |
| alias gcm='git checkout $(git_main_branch)' | |
| alias gcmsg='git commit --message' | |
| alias gcn='git commit --verbose --no-edit' | |
| alias gcn!='git commit --verbose --no-edit --amend' | |
| alias gco='git checkout' | |
| alias gcor='git checkout --recurse-submodules' | |
| alias gcount='git shortlog --summary --numbered' | |
| alias gcp='git cherry-pick' | |
| alias gcpa='git cherry-pick --abort' | |
| alias gcpc='git cherry-pick --continue' | |
| alias gcs='git commit --gpg-sign' | |
| alias gcsm='git commit --signoff --message' | |
| alias gcss='git commit --gpg-sign --signoff' | |
| alias gcssm='git commit --gpg-sign --signoff --message' | |
| alias gd='git diff' | |
| alias gdca='git diff --cached' | |
| alias gdct='git describe --tags $(git rev-list --tags --max-count=1)' | |
| alias gdcw='git diff --cached --word-diff' | |
| alias gds='git diff --staged' | |
| alias gdt='git diff-tree --no-commit-id --name-only -r' | |
| alias gdup='git diff @{upstream}' | |
| alias gdw='git diff --word-diff' | |
| alias gf='git fetch' | |
| alias gfa='git fetch --all --tags --prune --jobs=10' | |
| alias gfg='git ls-files | grep' | |
| alias gfo='git fetch origin' | |
| alias gg='git gui citool' | |
| alias gga='git gui citool --amend' | |
| alias ggpull='git pull origin "$(git_current_branch)"' | |
| alias ggpur=ggu | |
| alias ggpush='git push origin "$(git_current_branch)"' | |
| alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)' | |
| alias ghh='git help' | |
| alias gignore='git update-index --assume-unchanged' | |
| alias gignored='git ls-files -v | grep "^[[:lower:]]"' | |
| alias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk' | |
| alias gk='\gitk --all --branches &!' | |
| alias gke='\gitk --all $(git log --walk-reflogs --pretty=%h) &!' | |
| alias gl='git pull' | |
| alias glg='git log --stat' | |
| alias glgg='git log --graph' | |
| alias glgga='git log --graph --decorate --all' | |
| alias glgm='git log --graph --max-count=10' | |
| alias glgp='git log --stat --patch' | |
| alias glo='git log --oneline --decorate' | |
| alias globurl='noglob urlglobber ' | |
| alias glod='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"' | |
| alias glods='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset" --date=short' | |
| alias glog='git log --oneline --decorate --graph' | |
| alias gloga='git log --oneline --decorate --graph --all' | |
| alias glol='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset"' | |
| alias glola='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --all' | |
| alias glols='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --stat' | |
| alias glp=_git_log_prettily | |
| alias gluc='git pull upstream $(git_current_branch)' | |
| alias glum='git pull upstream $(git_main_branch)' | |
| alias gm='git merge' | |
| alias gma='git merge --abort' | |
| alias gmc='git merge --continue' | |
| alias gmff='git merge --ff-only' | |
| alias gmom='git merge origin/$(git_main_branch)' | |
| alias gms='git merge --squash' | |
| alias gmtl='git mergetool --no-prompt' | |
| alias gmtlvim='git mergetool --no-prompt --tool=vimdiff' | |
| alias gmum='git merge upstream/$(git_main_branch)' | |
| alias gp='git push' | |
| alias gpd='git push --dry-run' | |
| alias gpf='git push --force-with-lease --force-if-includes' | |
| alias gpf!='git push --force' | |
| alias gpoat='git push origin --all && git push origin --tags' | |
| alias gpod='git push origin --delete' | |
| alias gpr='git pull --rebase' | |
| alias gpra='git pull --rebase --autostash' | |
| alias gprav='git pull --rebase --autostash -v' | |
| alias gpristine='git reset --hard && git clean --force -dfx' | |
| alias gprom='git pull --rebase origin $(git_main_branch)' | |
| alias gpromi='git pull --rebase=interactive origin $(git_main_branch)' | |
| alias gprum='git pull --rebase upstream $(git_main_branch)' | |
| alias gprumi='git pull --rebase=interactive upstream $(git_main_branch)' | |
| alias gprv='git pull --rebase -v' | |
| alias gpsup='git push --set-upstream origin $(git_current_branch)' | |
| alias gpsupf='git push --set-upstream origin $(git_current_branch) --force-with-lease --force-if-includes' | |
| alias gpu='git push upstream' | |
| alias gpv='git push --verbose' | |
| alias gr='git remote' | |
| alias gra='git remote add' | |
| alias grb='git rebase' | |
| alias grba='git rebase --abort' | |
| alias grbc='git rebase --continue' | |
| alias grbd='git rebase $(git_develop_branch)' | |
| alias grbi='git rebase --interactive' | |
| alias grbm='git rebase $(git_main_branch)' | |
| alias grbo='git rebase --onto' | |
| alias grbom='git rebase origin/$(git_main_branch)' | |
| alias grbs='git rebase --skip' | |
| alias grbum='git rebase upstream/$(git_main_branch)' | |
| alias grep='grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox,.venv,venv}' | |
| alias grev='git revert' | |
| alias greva='git revert --abort' | |
| alias grevc='git revert --continue' | |
| alias grf='git reflog' | |
| alias grh='git reset' | |
| alias grhh='git reset --hard' | |
| alias grhk='git reset --keep' | |
| alias grhs='git reset --soft' | |
| alias grm='git rm' | |
| alias grmc='git rm --cached' | |
| alias grmv='git remote rename' | |
| alias groh='git reset origin/$(git_current_branch) --hard' | |
| alias grrm='git remote remove' | |
| alias grs='git restore' | |
| alias grset='git remote set-url' | |
| alias grss='git restore --source' | |
| alias grst='git restore --staged' | |
| alias grt='cd "$(git rev-parse --show-toplevel || echo .)"' | |
| alias gru='git reset --' | |
| alias grup='git remote update' | |
| alias grv='git remote --verbose' | |
| alias gsb='git status --short --branch' | |
| alias gsd='git svn dcommit' | |
| alias gsh='git show' | |
| alias gsi='git submodule init' | |
| alias gsps='git show --pretty=short --show-signature' | |
| alias gsr='git svn rebase' | |
| alias gss='git status --short' | |
| alias gst='git status' | |
| alias gsta='git stash push' | |
| alias gstaa='git stash apply' | |
| alias gstall='git stash --all' | |
| alias gstc='git stash clear' | |
| alias gstd='git stash drop' | |
| alias gstl='git stash list' | |
| alias gstp='git stash pop' | |
| alias gsts='git stash show --patch' | |
| alias gstu='gsta --include-untracked' | |
| alias gsu='git submodule update' | |
| alias gsw='git switch' | |
| alias gswc='git switch --create' | |
| alias gswd='git switch $(git_develop_branch)' | |
| alias gswm='git switch $(git_main_branch)' | |
| alias gta='git tag --annotate' | |
| alias gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl' | |
| alias gts='git tag --sign' | |
| alias gtv='git tag | sort -V' | |
| alias gunignore='git update-index --no-assume-unchanged' | |
| alias gunwip='git rev-list --max-count=1 --format="%s" HEAD | grep -q "\--wip--" && git reset HEAD~1' | |
| alias gup=$'\n print -Pu2 "%F{yellow}[oh-my-zsh] \'%F{red}gup%F{yellow}\' is a deprecated alias, using \'%F{green}gpr%F{yellow}\' instead.%f"\n gpr' | |
| alias gupa=$'\n print -Pu2 "%F{yellow}[oh-my-zsh] \'%F{red}gupa%F{yellow}\' is a deprecated alias, using \'%F{green}gpra%F{yellow}\' instead.%f"\n gpra' | |
| alias gupav=$'\n print -Pu2 "%F{yellow}[oh-my-zsh] \'%F{red}gupav%F{yellow}\' is a deprecated alias, using \'%F{green}gprav%F{yellow}\' instead.%f"\n gprav' | |
| alias gupom=$'\n print -Pu2 "%F{yellow}[oh-my-zsh] \'%F{red}gupom%F{yellow}\' is a deprecated alias, using \'%F{green}gprom%F{yellow}\' instead.%f"\n gprom' | |
| alias gupomi=$'\n print -Pu2 "%F{yellow}[oh-my-zsh] \'%F{red}gupomi%F{yellow}\' is a deprecated alias, using \'%F{green}gpromi%F{yellow}\' instead.%f"\n gpromi' | |
| alias gupv=$'\n print -Pu2 "%F{yellow}[oh-my-zsh] \'%F{red}gupv%F{yellow}\' is a deprecated alias, using \'%F{green}gprv%F{yellow}\' instead.%f"\n gprv' | |
| alias gwch='git whatchanged -p --abbrev-commit --pretty=medium' | |
| alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"' | |
| alias gwipe='git reset --hard && git clean --force -df' | |
| alias gwt='git worktree' | |
| alias gwta='git worktree add' | |
| alias gwtls='git worktree list' | |
| alias gwtmv='git worktree move' | |
| alias gwtrm='git worktree remove' | |
| alias h='history' | |
| alias hg='history | grep $1' | |
| alias l='ls -lah' | |
| alias l.='ls -d .* --color=auto' | |
| alias la='ls -lAh' | |
| alias ll='ls -lAFh' | |
| alias ls='ls --color=tty' | |
| alias lsa='ls -lah' | |
| alias less='less -FSRXc' | |
| alias mc='. /usr/libexec/mc/mc-wrapper.sh' | |
| alias md='mkdir -p' | |
| alias rmdir=rmdir | |
| alias run-help=man | |
| alias path='echo -e ${PATH//:/\\n}' | |
| alias pu='pushd' | |
| alias po='popd' | |
| alias rd='rmdir' | |
| alias show_options='shopt' | |
| alias src='source ~/.bashrc' | |
| alias vi='vim' | |
| alias wget='wget -c' | |
| alias wpcc='wp core config' | |
| alias wpcd='wp core download' | |
| alias wpci='wp core install' | |
| alias wpcii='wp core is-installed' | |
| alias wpcmc='wp core multisite-convert' | |
| alias wpcmi='wp core multisite-install' | |
| alias wpcre='wp cron event' | |
| alias wpcrs='wp cron schedule' | |
| alias wpcrt='wp cron test' | |
| alias wpcu='wp core update' | |
| alias wpcudb='wp core update-db' | |
| alias wpcvc='wp core verify-checksums' | |
| alias wpdbch='wp db check' | |
| alias wpdbcr='wp db create' | |
| alias wpdbe='wp db export' | |
| alias wpdbr='wp db repair' | |
| alias wpdbs='wp db search' | |
| alias wpmc='wp menu create' | |
| alias wpmd='wp menu delete' | |
| alias wpmi='wp menu item' | |
| alias wpml='wp menu list' | |
| alias wpmlo='wp menu location' | |
| alias wppa='wp plugin activate' | |
| alias wppd='wp plugin delete' | |
| alias wppda='wp plugin deactivate' | |
| alias wppg='wp plugin get' | |
| alias wppi='wp plugin install' | |
| alias wppis='wp plugin is-installed' | |
| alias wppl='wp plugin list' | |
| alias wppoc='wp post create' | |
| alias wppod='wp post delete' | |
| alias wppoe='wp post edit' | |
| alias wppog='wp post get' | |
| alias wppogen='wp post generate' | |
| alias wppol='wp post list' | |
| alias wppom='wp post meta' | |
| alias wppou='wp post update' | |
| alias wppourl='wp post url' | |
| alias wppp='wp plugin path' | |
| alias wpps='wp plugin search' | |
| alias wppst='wp plugin status' | |
| alias wppt='wp plugin toggle' | |
| alias wppu='wp plugin update' | |
| alias wppun='wp plugin uninstall' | |
| alias wpsbl='wp sidebar list' | |
| alias wpa='wp theme activate' | |
| alias wptd='wp theme delete' | |
| alias wptdis='wp theme disable' | |
| alias wpte='wp theme enable' | |
| alias wptg='wp theme get' | |
| alias wpti='wp theme install' | |
| alias wptis='wp theme is-installed' | |
| alias wptl='wp theme list' | |
| alias wptm='wp theme mod' | |
| alias wptp='wp theme path' | |
| alias wpts='wp theme search' | |
| alias wptst='wp theme status' | |
| alias wptu='wp theme update' | |
| alias wpuac='wp user add-cap' | |
| alias wpuar='wp user add-role' | |
| alias wpuc='wp user create' | |
| alias wpud='wp user delete' | |
| alias wpug='wp user get' | |
| alias wpugen='wp user generate' | |
| alias wpui='wp user import-csv' | |
| alias wpul='wp user list' | |
| alias wpulc='wp user list-caps' | |
| alias wpum='wp user meta' | |
| alias wpurc='wp user remove-cap' | |
| alias wpurr='wp user remove-role' | |
| alias wpusr='wp user set-role' | |
| alias wpuu='wp user update' | |
| alias wpwa='wp widget add' | |
| alias wpwd='wp widget delete' | |
| alias wpwda='wp widget deactivate' | |
| alias wpwl='wp widget list' | |
| alias wpwm='wp widget move' | |
| alias wpwu='wp widget update' | |
| alias xzegrep='xzegrep --color=auto' | |
| alias xzfgrep='xzfgrep --color=auto' | |
| alias xzgrep='xzgrep --color=auto' | |
| alias zegrep='zegrep --color=auto' | |
| alias zfgrep='zfgrep --color=auto' | |
| alias zgrep='zgrep --color=auto' |
Somehow, we can utilize this with other systems that don't create bas.aliases, such as 3CX PBX.
sudo tee -a /etc/bash.bashrc > /dev/null << 'EOF'
if [ -f /etc/bash.aliases ]; then
. /etc/bash.aliases
fi
EOF
cd ~ && curl -s https://gist.github.com/Anasxrt/9eb1cb01e9ccf0826e1f786dfe29ac29/raw | tee .bash_aliases_raw | grep '^alias' > .bash_aliases && rm -f .bash_aliases_raw && sed -i 's/\r$//' .bash_aliases && source .bash_aliases
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quick Install — Aliases Only, No Comments: run it in Cloudway shell
cd ~ && curl -s https://gist.github.com/Anasxrt/9eb1cb01e9ccf0826e1f786dfe29ac29/raw | tee .bash_aliases_raw | grep '^alias' > .bash_aliases && rm -f .bash_aliases_raw && sed -i 's/\r$//' .bash_aliases && source .bash_aliases