Advertisement

Save Alias settings/profile BASH shell

Started by October 06, 2005 05:03 PM
0 comments, last by Halsafar 18 years, 11 months ago
I'm not sure if my subject is correcet for this thread. Anyway, I type a bunch of alias's for example: alias ls='ls -al --color=tty' I'd like to save this so next time I open the Konsole it works. However this is prooving to not be an easy task. Any advice? Maybe I have to set a profile? Speaking of profils, how do I set a current profile.
Well I solved the problem myself, shouldn't have made this post in the first place.

But another case where google provided little on the topic of the alias command. I mean lots of info on how to use alias but nothing on how to make it permanent.

Simply modify ur current user's .bashrc for
/home/username/.bashrc

- Add ur alias lines there, make sure they do not cross 1 line tho.
- close ur shell
- open ur shell

Another tip I couldn't find until I did some deep extensive searching, was how to do complex alias's.

Example:

AsteroidCopy='rm *.class; javac Asteroids.java; cp *.class /network/1/Asteroids/'

That pulls out 3 commands in 1. As you can see in my example it removes all the *.class fils, recompiles them, then copies them to the other comps in my network for extensive testing.

This topic is closed to new replies.

Advertisement