Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reload .bash_profile from the command line?

How can I reload .bash_profile from the command line?

I can get the shell to recognize changes to .bash_profile by exiting and logging back in but I would like to be able to do it on demand.

like image 404
markdorison Avatar asked Jan 05 '11 19:01

markdorison


People also ask

Where is bash_profile file in Linux?

The . bash_profile is used for customizing the user configuration settings. This file is located in the home directory and is mostly hidden.

What is .bash_profile file in Linux?

The . bash_profile file is a personal initialization file for configuring the user environment. The file is defined in your home directory and can be used for the following: Modifying your working environment by setting custom environment variables and terminal settings.

How do you check what shell I am using?

How to check which shell am I using: Use the following Linux or Unix commands: ps -p $$ – Display your current shell name reliably. echo "$SHELL" – Print the shell for the current user but not necessarily the shell that is running at the movement.


1 Answers

Simply type source ~/.bash_profile

Alternatively, if you like saving keystrokes you can type . ~/.bash_profile

like image 143
SiegeX Avatar answered Sep 20 '22 11:09

SiegeX