I installed Kali Linux v2020.4 using i3-wm and have updated .profile
[below] to include an exported PATH
, as I assumed updating .profile
would impact all shells (sh, Bash, Zsh, etc.).
After logging out/in, I'm not able to run a script that exists inside Desktop
, but if I run source ~/.profile
, then I'm able to execute it:
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
- This is strange behavior to me and has only occurred using Kali; I have no
~/bash_profile
, and don't want to include it in~/.bashrc
, as I want it to be available for all shells
~/.profile
by default (for example, I don't believe Zsh does)? What shells are being used besides Bash? You may also want to check out the.profile
man page viaman .profile
, or some variant thereof, and have you tried adding it to/etc/profile
instead of~/.profile
?chsh
, and the problem persists. Also I edited/etc/profile
to includeexport PATH="$HOME/Desktop:$PATH"
and still nothing inPATH
.profile
(I could also very be wrong, as I'm more familiar with Zsh than Bash and other shells)