Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

With command which we can get the pathname which would be executed in the current environment. But when I redefined a command with alias in .bashrc . The result returned by which is still the old one even in a new terminal. How can I get the right output?

$ which -a python
/home/gerry/epd7/bin/python
/usr/bin/python
$ which python
/home/gerry/epd7/bin/python
$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
$ /home/gerry/epd7/bin/python
Enthought Python Distribution -- www.enthought.com
Version: 7.1-2 (64-bit)

Python 2.7.2 |EPD 7.1-2 (64-bit)| (default, Jul  3 2011, 15:17:51) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "packages", "demo" or "enthought" for more information.
>>> 

Update: I have tried source .bashrc, relogin,rebooting. None of them work. There must be cache somewhere. I am using Mint Linux 11 64bit

share|improve this question
    
Since Linux Mint questions are considered off-topic for Ask Ubuntu, I recommend posting this on somewhere they are considered on-topic, such as the Linux Mint Forums or Unix.SE. –  Eliah Kagan Jun 27 '12 at 6:32
add comment

closed as off topic by izx, Eliah Kagan, Rinzwind, Takkat, Tachyons Jun 27 '12 at 8:20

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

You should reload the .bashrc with source .bashrc, or else, logout and login.

share|improve this answer
    
No, relogin didn't work, even rebooting didn't help. There must be cache somewhere. –  gerry Jun 27 '12 at 4:32
    
No there is no cache but your are assuming solutions for Ubuntu work for Mint and that is not always the case. Please use a Ubuntu Mint forum for this question ;) –  Rinzwind Jun 27 '12 at 6:43
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.