This is how we know that we know him: if we keep his commandments.
And hereby we do know that we know him: "Hereby" is en toutoi in the Greek, meaning, "in this." This expression is used several times in this epistle. Coffman says it is used to introduce certain "tests" by which the validity of various matters might be ascertained (370). The test introduced here has to do with the legitimacy of one’s knowledge of God. The Gnostics took great pride in their claim to elevated knowledge, which, they said, assured them of their relationship with God and their ultimate salvation. John declares that there is a test by which one can validate his "knowing" God. What does it mean to "know" God? Does it mean that we have certain information about God? The word "know" means much more than simple head knowledge.