https://github.com/cybersecurity-dev/bash-toolkit
Bash Toolkit: Your Swiss Army Knife for the Command Line
https://github.com/cybersecurity-dev/bash-toolkit
bash bash-profile bash-script bash-scripting bash-scripts bashrc bashrc-configs scripting-language shell-script
Last synced: 8 days ago
JSON representation
Bash Toolkit: Your Swiss Army Knife for the Command Line
- Host: GitHub
- URL: https://github.com/cybersecurity-dev/bash-toolkit
- Owner: cybersecurity-dev
- License: apache-2.0
- Created: 2024-11-14T12:09:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-10T10:54:45.000Z (10 months ago)
- Last Synced: 2025-08-31T21:11:18.373Z (9 months ago)
- Topics: bash, bash-profile, bash-script, bash-scripting, bash-scripts, bashrc, bashrc-configs, scripting-language, shell-script
- Language: Shell
- Homepage: https://www.gnu.org/software/bash/
- Size: 66.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **[Bash](https://wikipedia.org/wiki/Bash_(Unix_shell)) Toolkit** | _Your Swiss Army Knife for the Command Line_
[](https://github.com/cybersecurity-dev/awesome-bash-scripting-language)
[](https://youtube.com/playlist?list=PL9V4Zu3RroiVE4xP0WgiRLa_Fiszl83s0&si=bUeRrjG-EsewaOnO)
[](https://www.reddit.com/r/bash/)
## Alias List
```bash
alias cat="batcat"
```
* [](#)
```bash
alias cmd_system_update='sudo apt update && sudo apt full-upgrade -y && \
sudo apt autoremove && sudo apt clean && \
sudo apt autoclean && sudo apt autopurge'
```
* [](#)
```bash
alias cmd_system_update='sudo dnf upgrade --refresh -y && \
sudo dnf autoremove -y && sudo dnf clean all'
```
* [](#)
```bash
alias cmd_system_update='sudo zypper refresh && \
sudo zypper dist-upgrade -y --auto-agree-with-licenses && \
sudo zypper ps -s && sudo zypper clean --all && \
sudo zypper remove-orphaned'
```
## [SCP](https://man7.org/linux/man-pages/man1/scp.1.html)/[RSYNC](https://man7.org/linux/man-pages/man1/rsync.1.html)
Remote (and local) file-copying Tools
* DOWNLOAD
```bash
scp -r username@server_ip:/source/path/to/folder /destination/local/path/
```
```bash
rsync -avz username@server_ip:/source/path/to/folder /destination/local/path/
```
* UPLOAD
```bash
scp -r /source/local/path/ username@server_ip:/destination/path/to/folder
```
```bash
rsync -avz /source/local/path/ username@server_ip:/destination/path/to/folder
```
* COPY/SYNC between two Servers
```bash
scp -r username1@server_ip1:/source/path/to/folder/* username2@server_ip2:/destination/path/to/folder/*
```
```bash
rsync -avz username1@server_ip1:/source/path/to/folder/* username2@server_ip2:/destination/path/to/folder/*
```
```bash
rsync -avzh -e ssh --progress \
username1@server_ip1:/source/path/to/folder/* \
username2@server_ip2:/destination/path/to/folder/*
```
Noteworthy `rsync` options include:
* -r: Recurse through directories
* -a: for syncing archives recursively, preserving symbolic links, modification times, groups, owners, and permissions.
* -z: This option is for compressing the files before sending them in order to reduce the bandwidth when copying them.
* -h: human-readable, output numbers in a human-readable format.
* -p: preserve permissions
* -P: same as --partial --progress
* -u: skip files that are newer on the receiver
* -e: specify the remote shell to use
* `--include='*.txt'` # _rsync will include only files with the `.txt` extension from the /source/path/to/folder/* directory during the transfer._
* `--exclude='*.ext'` # _rsync will exclude files with the specified extension `*.ext` from the /source/path/to/folder/* directory during the transfer._
## TMUX List
* List session:
```bash
tmux ls
```
* New session:
```bash
tmux new -s
```
* Attach session:
```bash
tmux a -t
```
* Remove session:
```bash
tmux kill-session -t
```
* Quit session:
```bash
q
```
## Install SSH server
* [](#)
```bash
sudo apt-get install -y openssh-server && sudo systemctl enable ssh --now
```
* [](#)
```bash
sudo dnf install -y openssh-server && sudo systemctl enable sshd --now
```
* [](#)
```bash
sudo zypper install --no-confirm openssh && sudo systemctl enable sshd --now
```
* Add Firewall Rure
```bash
sudo firewall-cmd --permanent --add-service=ssh && sudo firewall-cmd --reload
```
## Verify that ssh service running
```bash
sudo systemctl status ssh
```
## Generate ssh-key
```bash
ssh-keygen -t rsa
```
```console
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):
Created directory '/home/user/.ssh'.
Enter passphrase (empty for no passphrase):
```
After that you will see public key :
```console
Your public key has been saved in /home/user/.ssh/id_rsa.pub
The key fingerprint is: ...
```
copy fingerprint and paste into:
```bash
vim /home/user_remote/.ssh/authorized_keys
```
or copy and install the public key using `ssh-copy-id` command in Linux
```bash
ssh-copy-id user_remote@user_remote_ip
```
and than you will connect via ssh without password but if you entered passphrase, system will ask you this.
## Install Applications
### Programming Language
#### [](#) [](#)
* [](https://www.debian.org/)
* LLVM
```bash
sudo apt-get update && sudo apt-get install -y clang && clang version
```
* GCC
```bash
sudo apt-get update && sudo apt-get install -y build-essential && g++ version
```
* [](https://www.fedoraproject.org/)
* LLVM
```bash
sudo dnf upgrade --refresh && sudo dnf install -y clang && clang version
```
* [](https://www.opensuse.org/)
```bash
sudo zypper refresh && sudo zypper install -y clang && clang version
```
#### [](#)
* [](https://www.debian.org/)
```bash
sudo apt-get update && sudo apt-get install -y golang && go version
```
* [](https://www.fedoraproject.org/)
```bash
sudo dnf upgrade --refresh && sudo dnf install -y go && go version
```
* [](https://www.opensuse.org/)
```bash
sudo zypper refresh && sudo zypper install -y go && go version
```
#### [](#)
* [](https://www.debian.org/)
```bash
sudo apt-get update && sudo apt-get install -y -y python3 python3-pip python3-devel && pip3 --version && pip3 install --upgrade pip && pip3 --version
```
* [](https://www.fedoraproject.org/)
```bash
sudo dnf upgrade --refresh && sudo dnf install -y python3 python3-pip python3-devel && pip3 --version && pip3 install --upgrade pip && pip3 --version
```
* [](https://www.opensuse.org/)
```bash
sudo zypper refresh && sudo zypper install -y python3 python3-pip python3-devel && pip3 --version
```
#### [](#)
* [](https://www.debian.org/)
```bash
sudo apt-get update && sudo apt-get install -y rustc && rustc -V
```
* [](https://www.fedoraproject.org/)
```bash
sudo dnf upgrade --refresh && sudo dnf install -y rustc && rustc -V
```
* [](https://www.opensuse.org/)
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh && rustc -V
```
* Windows Subsystem for Linux
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh && rustc -V
```
#### [](https://soliditylang.org/)
* [](https://www.debian.org/)
```bash
sudo add-apt-repository ppa:ethereum/Ethereum
```
```bash
sudo apt-get update && sudo apt-get install -y solc && solc --version
```
* [](https://www.fedoraproject.org/)
```bash
sudo snap install solc && && solc --version
```
* [](https://www.opensuse.org/)
```bash
sudo snap install solc && solc --version
```
##
### My Awesome Lists
You can access the my awesome lists [here](https://cyberthreatdefence.com/my_awesome_lists)
### Contributing
[Contributions of any kind welcome, just follow the guidelines](contributing.md)!
### Contributors
[Thanks goes to these contributors](https://github.com/cybersecurity-dev/Bash-Toolkit/graphs/contributors)!
[🔼 Back to top](#bash-toolkit--your-swiss-army-knife-for-the-command-line)