Linux Environment Variables

Linux Environment Variables

Linux has many environment variables. A few worth remembering are pwd, path, PS1, USER and VISUAL. These environment variables can be used during each session. Alternatively, you can create environment variables which will last for your SSH session.

Using Environment Variables

root@vps [~]# echo $PATH 

root@vps [~]# echo $USER 
root@vps [~]# echo $VISUAL 

Creating Environment Variables

root@vps [~]# VAR="Hello" 
root@vps [~]# export VAR 
root@vps [~]# bash 
root@vps [~]# echo $VAR