modifying .bashrc and .bash_aliases
I'm fairly new to RHEL and Ubuntu 9.10 and need to know how to do a lot of bash operations. I'm fairly up to speed but I want to create aliases and change the bash prompt, etc. and have that affected for each bash session (i.e. permanent).
So which files do I need to create/modify in RHEL? Is there a separate file for aliases in RHEL? This was fairly straight-forward in Ubuntu. There is a /etc/bashrc script. Is this one global? I just want to write one or mod one for me (current user, not root or all users). So I wrote a .bashrc in my home directory and did a 'chmod u+x .bashrc'. When I opened a new bash terminal, my new alias 'l' command is not recognized. Here is the script: #!/bin/bash alias l='ls -la' |
Hi, and welcome to LQ!
Have a look at ~/.bashrc and ~/.bash_{profile,login} Things in ~/.bashrc should usually just "take", and aliases are commonly in that file, too. And bashrc doesn't need the shebang line - it's being sourced. Cheers, Tink |
You don't need to make it executable and you have to log out and back in again for bashrc to start working.
|
you can also type
Code:
source .bashrc |
Here's some good bash tutorials
http://rute.2038bug.com/index.html.gz - Linux at the cmd line http://tldp.org/LDP/Bash-Beginners-G...tml/index.html http://www.tldp.org/LDP/abs/html/ |
thanks much for the replies. I got kicked off the Ubuntu/Win7 box and now using WinXP (blame the wife) but I'll give it a try soon.
btw, I'm a Java developer and noticed that Eclipse 3.5 (Galileo) runs much faster on Ubuntu (it's a 2007 Dell with AMD X2 proc, nothing fancy) than on Win boxes. |
I think you'll find a lot of things will run a little faster on Linux
|
Quote:
Evo2. |
All times are GMT -5. The time now is 08:25 AM. |