What am I?

My tail is long my coat is brown I like the country I like the town. I can live in a house or live in a shed And I come out to play when you are in bed.