Welcome to World building ThatGuy. I'm not entirely sure what you mean by "linear gravity" but there are 3 ways to create a gravitational effect.:
Accumulate sufficient mass in one place (such as on planet earth) and build the city there.
Accelerate your city at a constant rate in any direction. This is quite feasible, but the problem is you need a massive supply of fuel to do this and it can only be sustained for a limited period befirebefore you run out.
Place you city into the inside of a spinning structure giving it acceleration by virtue of the fact that its velocity is constantly changing.
Does this help? If not please refine your question to describe exactly what you mean by linear gravity