I too have long hair and it can be a real pain to look after. Here are some of the things I do to keep it in good condition. Firstly, to stop my hair from getting tangled I comb through it gently (to avoid breakages) with a wide-toothed comb before washing it (it's important to do it before whilst the hair is still dry because when it's wet/damp it's very elasticated and easy to break) and braid it before I go to sleep. Braiding your hair is actually one of the best tips I can give you to avoid tangled hair so do it as often as you can.
Secondly, it is important to trim those dead ends every once in a while, ideally once a month. Although this won't make your hair grow any faster, it will prevent it from looking dull/damaged and from getting tangled too often. If you find that going to the salon on a somewhat regular basis is too pricey, you could always trim it yourself (I do my own; it's pretty easy if your hair is just one length like mine) or ask a friend who knows what they're doing to do it for you.
Thirdly, always make sure that after shampooing you leave the conditioner in your hair for at least 5-6 minutes. Usually on the bottle they'll tell you that 2-3 minutes is enough but ever since I've been leaving it in for longer before rinsing out, my hair has been a lot softer. If you regularly use heat appliances to style or dry your hair then I strongly suggest you invest in a good heat protectant (I recommend CHI 44 Iron Guard Thermal Protection Spray). Also, make sure you give your hair a deep conditioning treatment at least once a week. There are loads of recipes online for homemade hair masks made out of natural ingredients such as bananas, olive oil, etc. so you could check them out.
Lastly, make sure you have a balanced diet and you're consuming enough protein and fresh fruit+veg, as it really does make a difference. Ignoring some food groups will often lead to your hair, skin and nails being badly affected.
I hope this has helped you.