I have a kali linux version 2020.4 installed. I have updated the ~/.profile file to include the following line:
Code:
export PATH="$HOME/Desktop:$PATH"
I assume that by updating the .profile it would impact all the shells (sh, bash, zsh, etc.) After logout and login I'm not able to run a script that exists inside Desktop. If I run
Code:
source ~/.profile
I'm now able to execute the said script
This is strange behavior to me and only happened to me using kali distro.
I have no ./bash_profile file in my home directory and I don't want to include this export PATH in my .bashrc because I want it to be available for all shells.
My .profile file:

Code:
export PATH="$HOME/Desktop:$PATH"

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi
I also posted this question in StackExchange but had no answers so I decided to come here for help. Thank you for your time!