[Sorted] How to set a bash alias

I found the bashrc in system/settings and wacked some code in, but it was not found. What is the correct way to add an alias?

1 Like

I put mine in ~/config/settings/profile.

1 Like

There’s also a /boot/system/settings/etc/profile file and a /boot/system/settings/etc/profile.d folder.

1 Like

A Terminal session needs config/settings/profile - but if you invoke bash from the shell prompt, that session will go to config/settings/bashrc instead.

So what makes sense for things like aliases, is to do that in bashrc, and source bashrc from profile. Aliases, shell functions, variables like PS1. Environment variables are inherited, so they should be defined in profile.

Scripts won’t read either, which is for the best.

1 Like

Sorted it out, thanks!

Thread renamed accordingly.

2 Likes