0% found this document useful (0 votes)
16 views1 page

Best Practices for .bashrc Configuration

The document is a configuration file for the Bash shell, specifically the .bashrc file. It includes commands to source global definitions, set user-specific environment variables, and load user-defined aliases and functions. Additionally, it configures the Node Version Manager (NVM) for managing Node.js versions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Best Practices for .bashrc Configuration

The document is a configuration file for the Bash shell, specifically the .bashrc file. It includes commands to source global definitions, set user-specific environment variables, and load user-defined aliases and functions. Additionally, it configures the Node Version Manager (NVM) for managing Node.js versions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

# .

bashrc

# Source global definitions


if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

if [ -f ~/.custom-files/.bashrc-extended ]; then
. ~/.custom-files/.bashrc-extended
fi

# User specific environment


if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions


if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
fi
unset rc

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/[Link]" ] && \. "$NVM_DIR/[Link]" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads
nvm bash_completion

You might also like