Skip to content

Instantly share code, notes, and snippets.

@aaronedev
Last active September 6, 2025 08:49
Show Gist options
  • Select an option

  • Save aaronedev/a0f9ca097eb50047aecc0605fdce947e to your computer and use it in GitHub Desktop.

Select an option

Save aaronedev/a0f9ca097eb50047aecc0605fdce947e to your computer and use it in GitHub Desktop.
root bashrc_profile
#!/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