Computing.Net > Forums > Linux > running .bashrc

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

running .bashrc

Reply to Message Icon

Name: iraja
Date: February 24, 2002 at 21:27:32 Pacific
Comment:

Hi everyone,
i have problems with .bashrc.
Following is the file

#! /bin/bash
alias l='ls -asl'
echo " hello world"

and it is not working...when i run ./.bashrc
it does echoes hello world. but when i tye
l
it say bash:command not found.
well i have tried everything being a root, changing permissions etc etc..nothing seems to be working.
Can anyone help me out.




Sponsored Link
Ads by Google

Response Number 1
Name: hena
Date: February 25, 2002 at 02:39:23 Pacific
Reply:

Remove the first line "#!/bin/bash" from
the .bashrc file. That makes it to be a
script file which works only when it is
run. The ~/.bashrc is not a script file but
a config file for bash.


0

Response Number 2
Name: iraja
Date: February 25, 2002 at 04:39:42 Pacific
Reply:

thanx hena,
i have tried that as well.
giving at the first line
#
alias l='ls -asl'
doesn't worked


0

Response Number 3
Name: hena
Date: February 25, 2002 at 04:59:04 Pacific
Reply:

The first line don't need to have anything.
Anything after # is considered as comment
(few exceptions to this eq. #! which is a
script file).

Did you relog after changes? You need to
log in to make the changes to be activated.
It is read every time you log in.
Alternativaly you can give command "source
.bashrc", which will reload the whole file
(man source).


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: running .bashrc

Running Java in Linux Terminal www.computing.net/answers/linux/running-java-in-linux-terminal/25477.html

Mozilla only runs as root user www.computing.net/answers/linux/mozilla-only-runs-as-root-user/27334.html

Messed my .bashrc, have no commands www.computing.net/answers/linux/messed-my-bashrc-have-no-commands/19775.html