If you open your
.profile file, located in your home directory, i.e.
sudo gedit ~/.profile, it actually says, which files are used by your login shell.
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
echo $PATH in your terminal would have also given you the value of the
I neither have a
.bash_profile nor a
.bash_login file, therefore the command interpreter of my login shell - which is bash - executes my
.profile as stated in the file. (Find out what your shell is by using
echo $SHELL. Should the output be different from
/bin/bash, you may be interested in in this: https://unix.stackexchange.com/questions/88201/whats-the-best-distro-shell-agnostic-way-to-set-environment-variables)
Even though it says in the
.profile file above
include .bashrc if running bash, my
.bashrcfile is empty, for example.
Therefore I included the paths to the directories of my commands like
/usr/bin directly in the
/usr/bin is not included in the value of your
PATH variable, defined in your
.profile file, just add it after the other paths using a colon. The order of paths does not matter.
Part of the reason why this happened to you after booting into your other OS is because changes like permanently deleting or adding a path take only effect after reboot. So, as @solsTiCe already mentioned, Windows cannot mess with your system. "Something" else must have changed the
path paths .profile login loop 14.04