Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-25-2004, 05:45 PM
|
#1
|
Member
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228
Rep:
|
adding aliases, refreshing .bashrc
This one has probably been asked many times already, but I can't find anything on it...
I like to make things simple for me when I'm working, so I've added quite a few aliases in the bashrc file. Thing is, I can't figure out how to make the aliases and functions usable without having to restart X or sometimes even the computer. This is irritating considering I'm adding stuff into .bashrc almost every day. Is there some way to "refresh" the computer so that the new .bashrc gets loaded into memory? When I used Mandrake 10 it happened automagically, but not in Slackware current, which I'm using now.
|
|
|
06-25-2004, 06:00 PM
|
#2
|
Member
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405
Rep:
|
You can just type "bash" at the prompt to reload bashrc
alternatively, you can make an alias file, for example lets call it .aliases, and call it in from your bashrc. This way, you can just type
$source /path_to_it/.aliases
and it will refresh your aliases. Then, just add your new aliases to this file from now on. Here's some examples...
snippet from /etc/bashrc to call file
-------------------------------------------------
if [ -f /home/jeff/.aliases ]; then
. /home/jeff/.aliases
fi
-------------------------------------------------
and here's the .aliases file...
alias decode='for i in *.mp3; do lame --decode $i `basename $i .mp3`.wav; done'
alias pu=pushd
alias po=popd
alias la='ls -al'
well, you obviously know how to set aliases, so you don't need that I guess.
Anywho...good luck...
|
|
|
06-25-2004, 06:06 PM
|
#3
|
Member
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228
Original Poster
Rep:
|
Thank you  That solves my problem
Btw, isn't Minnesota the state to which most of the swedish imigrants came to last century?  Just wondering.
|
|
|
06-25-2004, 06:11 PM
|
#4
|
Member
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228
Original Poster
Rep:
|
Or rather, it should have solved it.
doing bash doesn't do the trick for me... aterm won't recognize the new aliases.
I'll try your second solution though.
|
|
|
06-25-2004, 06:17 PM
|
#5
|
Member
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405
Rep:
|
Ya sure, you betcha...oofda
In other words, you are correct...
|
|
|
06-25-2004, 06:23 PM
|
#6
|
Member
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228
Original Poster
Rep:
|
Well, every eight year old in sweden knows that one third of this countrys population skipped over the big pool to "the land where chicken grow to the size of cows" a little over a hundred years ago O_o (a THIRD!!!) ^_^
|
|
|
06-25-2004, 06:48 PM
|
#7
|
Member
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228
Original Poster
Rep:
|
Your second solution worked quite well, I must say  Even made an alias to reload .aliases 
Now I just have some wrestling with alsa and the gfx card left to do before this box is atleast as usable as my w1nd0ze box ^_^
|
|
|
06-25-2004, 11:04 PM
|
#8
|
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320
Rep:
|
Another option is to just open a new X terminal (close the current one if you wish)...each time a new terminal is opened it sources bashrc
|
|
|
06-25-2004, 11:39 PM
|
#9
|
Member
Registered: May 2004
Location: Västerås, Sweden
Distribution: Slackware Current
Posts: 228
Original Poster
Rep:
|
dang, why didn't I think of that.... 
|
|
|
All times are GMT -5. The time now is 05:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|