Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make changes in .bashrc effective in current terminal [duplicate]

Tags:

linux

bash

I have an open terminal in ubuntu lucid in which I need a new env variable set.So,I open the .bashrc file and edit it ,to add the new env variable( say PYTHONPATH)

.bashrc

PYTHONPATH=/some/path
export PYTHONPATH

But,in order to get this effective ,I need to close my terminal and open it again.Is there some command with which I can get this effect,without close/open the terminal again.

like image 676
damon Avatar asked May 31 '13 06:05

damon


2 Answers

Take a look at the source command: man source

source ~/.bashrc

Apart from that: why don't you simply use the environment commands directly in your shell to set an additional environment variable?

export PYTHONPATH="/some/path"

That way the created variable is effective right away.

like image 109
arkascha Avatar answered Sep 29 '22 12:09

arkascha


You can also try,

sat:~# . ~/.bashrc 
like image 35
sat Avatar answered Sep 29 '22 14:09

sat