1 John 2:6

4 If anyone says, “I know Him,” but does not keep His commandments, he is a liar, and the truth is not in him.

5 But if anyone keeps His word, the love of God has been truly perfected in him. By this we know that we are in Him:

Whoever claims to abide in Him must walk as Jesus walked.

7 Beloved, I am not writing to you a new commandment, but an old one, which you have had from the beginning. This commandment is the message you have heard.

8 Then again, I am also writing to you a new commandment, which is true in Him and also in you. For the darkness is fading and the true light is already shining.

Do read the surrounding verses too, because the context often says more than a single verse.

Compare

BSB
Whoever claims to abide in Him must walk as Jesus walked.
KJV
He that saith he abideth in him ought himself also so to walk, even as he walked.
WEB
he who says he remains in him ought himself also to walk just like he walked.
ASV
he that saith he abideth in him ought himself also to walk even as he walked.
DARBY
He that says he abides in him ought, even as *he* walked, himself also [so] to walk.
BLB
The one claiming to remain in Him ought, according to the manner that He walked, also himself in the same way to walk.
ÅB
Den som sier at han blir i ham, han er og skyldig å vandre slik som han vandret.
OTB
den som sier at han blir i Ham, bør selv også vandre slik som Han vandret.
B1930
Den som sier at han blir i ham, han er og skyldig å vandre således som han vandret.

Study notes (Tyndale)

Original text and word study

Cross references