# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://i.janardhanpulivarthi.com/season-2/bashrc-and-bash_profile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
