# bashrc and bash\_profile

### `.bash_profile`

This file each time a login happens.

{% code title=".bash\_profile" %}

```bash
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
```

{% endcode %}

### `.bashrc`

This file loads everytime we start a new bash session.

{% code title=".bashrc" %}

```bash
# .bashrc

# User specific aliases and functions

alias login='kubectl exec -it'
```

{% endcode %}

{% hint style="danger" %}
In case you could not log into the linux machine due to problems bash configuration file.

1. Press Ctrl+C immediately after login to prevent bash profile from loading.
2. A plain bash session opens. Correct the bash files. And login again.
   {% endhint %}
