Common bash alias under one roof. This project works perfectly with bash.
- Clone this repository under
~/.project
- Add the following line to your
~/.bashrc
file.
source ~/.project/main.sh
Some aliases in this project work with modifying permissions, restarting and stopping system services and so on. Please go through the aliases one by one and only use the ones that you are confident on.
Following are the currently available aliases.
mpp
=>sudo chmod -R 777 .
-
res
=>sudo systemctl restart $@
- Requires system name as argument
- Eg.
res nginx
-
start
=>sudo systemctl start $@
- Requires system name as argument
- Eg.
start nginx
-
stop
=>sudo systemctl stop $@
- Requires system name as argument
- Eg.
stop nginx
-
stat
=>sudo systemctl status $@
- Requires system name as argument
- Eg.
stat nginx
dc
=>sudo docker-compose
dc-up
=>sudo docker-compose up -d
dc-start
=>sudo docker-compose start
dc-stop
=>sudo docker-compose stop
dc-ex
=>sudo docker-compose exec
ps
=>sudo docker-compose ps
This uses Pimcores official docker-compose.yml for reference.
pim-console
=>sudo docker-compose exec php-fpm bin/console
pim-cc
=>sudo docker-compose exec php-fpm bin/console cache:clear
This uses Everyworkflows official docker repository for reference.
ew-console
=>sudo docker-compose exec cli php /var/www/html/bin/console
Warning: Please back up your ~/.gitconfig file before using this feature.
-
git-config-personal
=>mv -f ~/.gitconfig ~/.gitconfig.back && cp -f ./git/.gitconfig.personal ~/.gitconfig
This replaces the~/.gitconfig
file with.gitconfig.personal
inside the git directory -
git-config-work
=>mv -f ~/.gitconfig ~/.gitconfig.back && cp -f ./git/.gitconfig.work ~/.gitconfig
This replaces the~/.gitconfig
file with.gitconfig.personal
inside the git directory -
git-revert-config
=>mv -f ~/.gitconfig.back ~/.gitconfig
This replaces the~/.gitconfig
file with~/.gitconfig.back
Check git/.gitconfig.common
file for more git aliases.
-
install-php
=> installs specified php version- requires php version number
- Eg.
install-php 8.0
-
set-php-version
=> switches php version- requires php version number
- Eg.
set-php-version 8.0