The issue here is not really the difference between echo and export, but rather the difference between an environment variable and a simple shell variable (and also about how the /etc/environment file is normally used).
In particular, although /etc/environment happens to contain lines of the form name=value that are valid as POSIX shell variable assignments, ...
Scripts that are executed for a login shell (systemwide /etc/profile, any script in /etc/profile.d, your local ~/.profile and the other files you list) define the environment of your current user - since you logged in.
Any non-login shell that you subsequently open, will at least inherit the environment of your login shell. That is why you (already) have ...
echo and export are very different commands in the first place.
echo will display text. In echo $JAVA_HOME, the shell will substitute $JAVA_HOME with the contents of the shell variable JAVA_HOME it it is defined. Otherwise, $JAVA_HOME will return an empty string.
export provides the "export" attribute to the shell variable. export JAVA_HOME will ...
Building on the other answers here, some commands that parallel export but for other categories of variables are set (which works for e.g. VARIABLE=value then set | grep VARIABLE) and env
Each of these three commands, when given no arguments, prints a list of variables; which variables they will print has to do with the kinds of variables the command manages....
You need to put double quotes around $PROJECTPATH in your alias definition.
Also, I recommend against backslashes in your variable definition. It's less readable and isn't needed in this case:
PROJECTPATH='/mnt/c/Users/name/Dropbox/My PC (Laptop...)/Desktop/Studies/Python'
alias prjct='cd "$PROJECTPATH"'
There are a few comments worth noting.
"... the gpg passphrase (which is set by a script)". I take it you didn't write the script. Please post the script. Are there any instructions to use it?
passphrase="my!pass". This doesn't mean "use ! as part of the string". !pass means "read history, and get the last command starting ...
The output of the following commands should convince you that you can modify your environment variables.
$ grep PATH ~/.profile
# set PATH so it includes user's private bin if it exists
$ ls -l ~/.profile
-rw-r--r-- 1 sudodus sudodus 632 dec 10 2010 /home/sudodus/.profile
In other words,...
Every *.desktop file has Exec= field. This field may include:
executable name which is already in $PATH;
full path to executable which is not in $PATH;
full path to user/system-created script which does what is needed.
Documentation to read: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables .