Once again John dispels any misconceptions we might have about what it means to know God through the next verses of 1 John 2;
3 And we can be sure that we know him if we obey his commandments. 4 If someone claims, “I know God,” but doesn’t obey God’s commandments, that person is a liar and is not living in the truth. 5 But those who obey God’s word truly show how completely they love him. That is how we know we are living in him. 6 Those who say they live in God should live their lives as Jesus did. (1 John 2:3-6, NLT)
In today's society it's common for a person to say one thing but demonstrate something different through their actions. In these verses, we again learn that if we are claiming to know and love God (walk with Him in truth and light) then obedience must be something we practice. We can know and be assured that truly we are living in God (in the light) when we do those things we know He has commanded us to.
Obedience begins with the scriptures. If we don't obey the things God has commanded us through the written word, how will we be able to recognise His voice and obey when He speaks to us concerning the specifics of our daily lives?
Jesus loved the Father perfectly, and because of that He obeyed Him perfectly. As followers of Christ we are to follow in our Lord and big brother's footsteps, also walking in obedience.