The primary command he gave was:

> A new commandment I give to you, that you love one another: just as I have loved you, you also are to love one another. 35 By this all people will know that you are my disciples, if you have love for one another.”
(John 13:34–35, ESV)

He illustrated this command when he washed the disciples' feet (John 13:1-17).  See https://hermeneutics.stackexchange.com/questions/66161/what-does-washing-of-the-feet-symbolize-in-john-1310/66174#66174


> Go therefore and make disciples of all nations, baptizing them in the name of the Father and of the Son and of the Holy Spirit, 20 teaching them to observe all that I have commanded you. And behold, I am with you always, to the end of the age.” 
(Matt. 28:19–20, ESV)

See https://hermeneutics.stackexchange.com/questions/66734/what-is-the-best-translation-of-the-participles-in-the-great-commission-matt-2

The Greatest Commandment is:

> But when the Pharisees heard that he had silenced the Sadducees, they gathered together. 35 And one of them, a lawyer, asked him a question to test him. 36 “Teacher, which is the great commandment in the Law?” 37 And he said to him, “You shall love the Lord your God with all your heart and with all your soul and with all your mind. 38 This is the great and first commandment. 39 And a second is like it: You shall love your neighbor as yourself. 40 On these two commandments depend **all the Law and the Prophets**.” 
(Matt. 22:34–40)

Jesus illustrated this with the parable of the Good Samaritan (Luke 10:25-37).  See https://hermeneutics.stackexchange.com/questions/57023/given-the-dynamics-of-the-words-%cf%80%ce%bb%ce%b7%cf%83%ce%af%ce%bf%ce%bd-and-%d7%a8%d6%b5%d7%a2%d6%b7-what-did-jesus-illustrate-with

 I don't recall Jesus giving it as an actual commandment, but it is implied:

> Then they said to him, “What must we do, to be doing the works of God?” 29 Jesus answered them, “This is the work of God, that you believe in him whom he has sent.”
(John 6:28–29, ESV)