This repository contains a collection of Bash scripts for various tasks and utilities. Feel free to explore and use them as needed.
To clone this repository to your local machine, use the following command:
git clone https://https://github.com/totti786/bash-scripts
After cloning the repository, you may need to set executable permissions for the scripts. Navigate to the repository directory and run:
cd bash-scripts
chmod +x <name_of_script>
or you could make all the scripts excutable by running
cd bash-scripts
chmod +x *
For easy access to the scripts, you can place them in ~/.local/bin
. To do this, follow these steps:
-
Create the
~/.local/bin
directory if it doesn’t already exist:mkdir -p ~/.local/bin
-
Move the scripts to
~/.local/bin
:mv <name_of_script> ~/.local/bin/
To ensure that the scripts can be executed from anywhere on your system, you need to add ~/.local/bin
to your PATH
environment variable. If it’s not already included, you can add it by following these steps:
-
Open your shell configuration file in a text editor. For example, if you use
bash
, you might edit~/.bashrc
(for zsh users you need to edit.zshrc
instead):vim ~/.bashrc
-
Add the following line to the end of the file:
export PATH="$HOME/.local/bin:$PATH"
-
Save the file and exit the text editor.
-
Apply the changes to your current session:
source ~/.bashrc
If you have any improvements or fixes, feel free to submit a pull request or open an issue.