I will ask you, "how can I know I have the Spirit?"
You may say, "by your lifestyle, desires, conviction, etc".
I will say, "We are commanded to not sin. So I try not to sin. Therefore, my lifestyle, desires, etc, are lived according to Gods will. But these results are by my own effort. I can't distinguish between my works, and the Spirit's works. So...how do I know I have the spirit? Do I live my entire life assuming I have the Spirit, meanwhile potentially remain unsaved?"
You will say, "________"
You can know you are saved if you do the following:
1. Acknowledge that you are sinner who needs a saviour.
2. Believe that Jesus is the Son of God who died for you on the cross of Calvary and rose again from the dead to give you eternal life.
3. Receive Jesus as your personal Saviour and Lord.
4. Determine that you will do what you can to live a holy life before the Lord.
That is what saves you and opens you for the Holy Spirit to come in and dwell in your spirit. You receive Him by faith. Because He is a spirit who dwells in your spirit, this is separate from your emotions. The Scripture says "By grace are you saved by faith; it is not of yourselves, but it is a gift of God." Faith is believing God's word in spite of how you feel and what you sense.
If you are in doubt that you have received the Spirit, you can go through the following steps, to make sure.
1. Believe and accept that it is God's will for you to be filled with the Spirit.
2. Ask God to fill you with the Spirit.
3. Receive the Spirit into your life.
Once you have done that, you can be assured by faith that you are filled with the Spirit. Now, you have to allow the Spirit to flow out through your life. He does that by allowing love, joy, peace, gentleness, kindness, goodness, faithfulness, patience and self control to flow out of you. This is the Christian character that others will see and will either be attracted to the Christ within you, or they will oppose you. This is because they will be convicted of their sins when they come into your presence. It won't be you, but the Holy Spirit within you showing them Jesus.