Last active
March 28, 2022 15:09
-
-
Save bsara/f89ce808398a82705ff2 to your computer and use it in GitHub Desktop.
Useful Bash Aliases
This file contains 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
# Misc | |
alias oh="nemo . 2>/dev/null" | |
alias ohh="nautlius . 2>/dev/null" | |
alias cls=clear | |
alias lsa="ls -al" | |
alias ..="cd .." | |
alias ...="cd ../.." | |
# Google Chrome | |
alias chrome="/opt/google/chrome-beta/chrome" | |
alias chrome-stable="/opt/google/chrome/chrome" | |
# User/Group Management | |
grp-addu() { | |
# $0 = Group | |
# $1 = User | |
sudo adduser $1 $0 | |
} | |
grp-rmu() { | |
# $0 = Group | |
# $1 = User | |
sudo deluser $1 $0 | |
} | |
grpls() { | |
cat /etc/group | |
} |
This file contains 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
# Bower Shortcuts | |
bi() { | |
bower install $@ | |
} | |
bci() { | |
rm -rf bower_components/ && bower install $@ | |
} |
This file contains 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
# Docker Shortcuts | |
dimgs() { | |
docker images $@ | |
} | |
dls() { | |
docker ps -a $@ | |
} | |
dps() { | |
docker ps $@ | |
} | |
dsh() { | |
docker exec -it $@ /bin/bash | |
} |
This file contains 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
# Git Commands | |
gps() { | |
git push $@ | |
} | |
gpsa() { | |
git push --all | |
} | |
gpsb() { | |
git push origin $1:$1 | |
} | |
gpst() { | |
git push origin --tags $@ | |
} | |
gpsu() { | |
git push -u origin $@ | |
} | |
gf() { | |
git fetch $@ | |
} | |
gpl() { | |
git pull $@ | |
} | |
gplr() { | |
git pull -r $@ | |
} | |
gci() { | |
git commit $@ | |
} | |
gco() { | |
git checkout $@ | |
} | |
grb() { | |
git rebase $@ | |
} |
This file contains 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
# NPM Shortcuts | |
alias nls="npm ls --depth=0" | |
alias nlsg="npm ls -g --depth=0" | |
ni() { | |
npm install $@ | |
} | |
nis() { | |
sudo npm install $@ | |
} | |
ncu() { | |
npm-check --skip-unused $@ | |
} | |
ncug() { | |
npm-check -g $@ | |
} |
This file contains 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
# Ruby Shortcuts | |
bui() { | |
bundle install $@ | |
} | |
bue() { | |
bundle exec $@ | |
} | |
middleman() { | |
bundle exec middleman $@ | |
} | |
rake() { | |
bundle exec rake $@ | |
} | |
rails() { | |
bundle exec rails $@ | |
} |
This file contains 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
# Vagrant Shortcuts | |
alias vup="vagrant up" | |
alias vds="vagrant destroy" | |
alias vsp="vagrant suspend" | |
alias vhl="vagrant halt" | |
alias vst="vagrant status" | |
alias vssh="vagrant ssh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment