Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,810 members, 7,956,070 topics. Date: Sunday, 22 September 2024 at 11:57 PM |
Nairaland Forum / Science/Technology / Programming / Question Abt Bash (849 Views)
Bash/shell Scripting In A Unix/linux Environment / Abt Lincence Key (2) (3) (4)
(1) (Reply)
Question Abt Bash by abdul01(m): 7:37pm On Feb 05, 2015 |
Q: how do u make an alias persist even after closing d shell. E.g when I create an alias $alias py="cd c:/www/py" It successfully creates d alias and I can use it, but when I close d terminal(I use git bash on windows) n reopen it, d alias is gone. |
Re: Question Abt Bash by nextstep(m): 9:07pm On Feb 05, 2015 |
Put the alias in your ~/.bashrc ~/.bashrc is executed every time you open a new terminal ~/.bash_profile is executed on a login shell (e.g. ssh into or serial console), but not when you open a new terminal |
Re: Question Abt Bash by abdul01(m): 5:35am On Feb 07, 2015 |
Tnx a lot, I'v created d .bashrc in my home dir and added d alias too. But I noticed that I can only use it (d newly added alias) after restarting d terminal, but I found a way around this here(www.superuser.com/questions/602872/how-do-i-modify-my-git-bash-profile-in-windows) by using: source .bashrc after adding a new alias. Tnx |
(1) (Reply)
MATLAB Training Is The Solution To Your Scientific Computation Problem / Check Out The Mobile App That Provides Packaging Info / Topic: How To Start Your Own Dating Website (plus FREE Script)
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7 |