.bash_profile alias doesnīt seem to work
Hi, i am learning to write simple scripts, just to know a little more :cool:
i am learning from this site http://gd.tuwien.ac.at/linuxcommand.org/wss0020.html i have a problem with writing an alias in .bash_profile at home directory I write the alias like the site said: "at the end of the file add alias l='ls -l' " And then i log out and nothing happened, i modify the alias in the file just in case something was wrong, and nothing happened, then i even reboot my PC, and nothing :scratch: So what happened??? I checked with the alias command at the command prompt and the alias i added wasnīt on the list. Then I edit .bashrc the same way, i logged out, logged in again, and the alias worked fine, My question is: Why editing the .bash_profile didnīt work?? Info: I use vim to edit files, and here is the output for .bash_profile at home directory: Code:
# .bash_profile Does it add the aliases for all the users?? Thanks, Bye |||Electronkz|||| |
well, I don't know about .bash_profile, but I use aliases in ".bashrc" and they work just fine.
Dmn, Should have read the thread before answering... In that script, .bash_profile, there's a few lines like: if [ -f ~/.bashrc ]; then . ~/.bashrc fi That checks weather .bashrc exists, and if does, loads that file. So either put aliases there, or in .bash_profile BEFORE the if - line... |
OOOppppsssss!!!:cry: :(
I should have read in the site i mentioned a little more, at the bottom of the page it is explained!! :( Sorry for this silly question, And thanks for the reply anyway Always :study: What a stupid i am :( I guess it must be because in my country is very, very late, and i am very tired Bye |
All times are GMT -5. The time now is 09:11 AM. |