Assuming you are running bash shell and have defined env variable WL_HOME to contain the path to the weblogic home and JAVA_HOME to the path for java binaries for your OS and CLASSPATH have included the path to weblogic.jar
$ cd $WL_HOME/servers/bin
$ source ./setWLSEnv.sh
this runs the commands from setWLSEnv.sh to set the required environment variables such as WL_HOME, JAVA_HOME and CLASSPATH and make it available to the current shell