Alias issue in .profile

Hey guys,

So I wrote my own script to change wallpapers based on time, as well as do a few other things, and I created an alias in .profile, but every time I restart the computer I need to source .profile in order for the alias to work. What gives? I was under the impression this would happen automatically.

Other parts in .profile don't seem to be affected, such as enabling true color in micro, etc.

This is what I have added to my .profile regarding the alias:
alias wallpaper='bash ~/.scripts/wallpaper'

I sometimes create aliases but add them to the;
.bash_aliases file.

Been using them for ages, works perfect.

1 Like

I don't have .bash_aliases on my machine for some reason. I will add it to .bashrc and see if it works. I have a hunch it will bc it says bash executes it for non-login shells, vs .profile for login shells. Thanks for getting me on the right track.

I will update here if I still encounter issues.

You can not add it to .bashrc. That file is for other purposes.

If not present you can add the file to the directory and name it .bash_aliases and define your aliases in there.
Why? Guess.. that's how Linux makes use of the files in your home dir.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.