Last active
September 6, 2025 08:49
-
-
Save aaronedev/a0f9ca097eb50047aecc0605fdce947e to your computer and use it in GitHub Desktop.
root bashrc_profile
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # ━━━━━━━━━━━━━━━━━━━━━ Root Bash Profile ━━━━━━━━━━━━━━━━━━━━━ | |
| # Source .bashrc if it exists and we're in an interactive shell | |
| if [[ -f ~/.bashrc ]] && [[ $- == *i* ]]; then | |
| source ~/.bashrc | |
| fi | |
| # Add /root/.local/bin to PATH if it exists | |
| [[ -d /root/.local/bin ]] && export PATH="/root/.local/bin:$PATH" | |
| # Add /usr/local/bin to PATH if not already there | |
| [[ ":$PATH:" != *":/usr/local/bin:"* ]] && export PATH="/usr/local/bin:$PATH" | |
| # Set default editor | |
| export EDITOR=nvim | |
| export VISUAL=nvim | |
| # Set less options for better paging | |
| export LESS='-R -i -M -x4' | |
| export LESSHISTFILE=- | |
| # Set default permissions for new files | |
| umask 022 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment