code_geek
code_geek

Reputation: 163

can't write .bashrc to add path of android NDK

I have downloaded NDK for my eclips juno....now i have to add the NDK to path and have to add lines to .bashrc.

I have to add the following lines to my .bashrc

export ANDROID_NDK=/_path_to/android-ndk-linux/
export ANDROID_SDK=/_path_to/android-sdk-linux/
export PATH=$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK

In my terminal I wrote....

 ~/.bashrc

But it says bash:

/home/user/.bashrc: Permission denied

how can I change permission to write to .bashrc?????

Upvotes: 1

Views: 997

Answers (1)

John1024
John1024

Reputation: 113994

When you type on the command line:

~/.bashrc

You are requesting that the shell execute the file. If you want to edit the file, try:

nano ~/.bashrc

Replace nano with the name of your favorite editor.

If you just want to copy and paste those three lines into your file, you don't really need an editor. Just run the following:

cat >>~/.bashrc

Then, copy and paste those three lines. Then press enter and type control-D and you are done.

Upvotes: 1

Related Questions