I added a path where my own scripts reside which is executing fine when I give absolute paths in the terminal to execute. I read that adding path of such directory in the list of paths will enable them to to execute anywhere from terminal instead of giving absolute paths every time. So here I modified the path in the /etc/environment file and added the new path at the end. The file shows the newly added path but I'm unable to execute the programs. So what needs to be done to achieve that?
~/.profile is not found, I'm writing this because that's where most have redirected to add paths. I use linux mint and /etc/environment is where I found all the paths listed in the file. Thank you.
# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # 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. #umask 022 # 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 PATH="$HOME/Software/android-studio/bin/:$PATH"
I created and added this to my .profile file and still unable to execute the script or should I do it differently.
I simply typed
export PATH="$HOME/Software/android-studio/bin/:$PATH" in terminal and now it works although I would like to know where does this list of paths exist and why does the .profile solution didn't work