If yes, then keep the current directory:
~/bin or /usr/local/sbin
If no, and using local permission do
#!/bin/bash
# Create a 'bin' directory in your home directory if it doesn't exist
mkdir -p ~/bin
# Add the 'bin' directory to your PATH if not already added
if [[ ":$PATH:" != *":$HOME/bin:"* ]]; then
echo 'export PATH="$PATH:$HOME/bin"' >> ~/.bashrc
fi
# Apply changes to the current session
source ~/.bashrc
echo "Setup complete. 'bin' directory added to PATH."
If yes, then keep the current directory:
~/bin or /usr/local/sbin
If no, and using local permission do