If we keep the commandments of God we can know Him - 1 John 2:3
And hereby we do know that we know him, if we keep his commandments.
The first mark of being a true Christian is obedience. We can have assurance concerning our relationship with God, if our life is characterized by a desire to do His will. John described our obedience to God in a three-fold way– 1.) keeping His commandments (2:3), 2.) keeping His word (2:5), 3.) walking as He walked (2:6). This obedience is progressive – to keep His commandments is to obey the teachings of Christ, to keep His word means not only obedience to do what is written, but a desire to do what we know is right and what would please Him, and to walk as He walked is the full expression of God’s standard for His people, to live as Jesus lived, in humility, kindness, and gentleness.