Personal '~/.bashrc' script

I’ve noticed that the ‘/etc/bash.bashrc’ file seems to be read-only. Not sure if we have access to the super user (root) account or not.

Would it be possible for you to invoke any ‘~/.bashrc’ scripts (if found) from the ‘/etc/bash.bashrc’ file?

I’d like to add my favorite aliases and various configs in there.

Thanks,

Jeach

2 Likes

No, you don’t have root access in the container. We’ll look into doing that. It depends on whether the console tool we’re using supports it.

1 Like

It looks like you can already do that. The console we’re using should just pick it up. /app should be your home directory. Let me know if you have any problems.

1 Like

Hello,

Thanks for looking into it. But unfortunately it’s not working for me. Unless there is something I’m missing. Here is what I’ve done.

  1. In my home directory (~/), which I’ve confirmed that it is ./app as you mentioned.
  2. I’ve created a ‘.bashrc’ file (and even made it executable just in case (with: chmod +x ~/.bashrc)
  3. Opened it and wrote the following lines:

#!/bin/bash
alias ll=‘ls -la’

But each time that I open up the Terminal, my ‘ll’ alias does not work. So something is not working with it.

Am I missing something?

Thanks,

Jeach

1 Like

I tested this out this morning and it should work fine using .bash_profile in /app instead of .bashrc. Set it +x as you did and each remixed project that contains it should be good to go. In that initial project it’s fastest to just source .bash_profile once you’ve created it if you want to start using it immediately.

4 Likes

Hello,

Ok, I’ve just renamed my ~/.bashrc to the recommended ~/.bash_profile and it does work now.

And yes, until now I was manually sourcing (with . ~/.bashrc) but that got annoying to manually do it each time.

Thanks for the help.

Regards,

Jeach

2 Likes