Thursday, April 14, 2022

[SOLVED] $HOME/bin in path on Linux Mint 14

Issue

I'd like to amend my user's path in Linux Mint 14 Cinnamon to include $HOME/bin in my user's $PATH.

Warning: simply adding to .profile does not seem to work, even though other commands in .profile are called correctly and even though it works when calling source .profile explicitly.

What are my alternatives?


Solution

It turns out the right file to do the edit into is .bashrc, not .profile. .profile will call .bashrc at its beginning.

Add to .bashrc:

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


Answered By - arden
Answer Checked By - Marie Seifert (WPSolving Admin)