Edit: Additional information per chat and question update:
One the one hand, if you have complete control over how much air goes into the tube, then you also have complete control over the air pressure. On the other hand, you want to pump in enough air to last for many millennia.
As discussed below, due to several factors, the atmosphere ("atmocylinder?") would always be bleeding off into space. With that in mind, the answer to your question depends on whether you're open to replenishing the air inside the tube over time, or if you want to fill it only once in the beginning; I'll touch on both scenarios. Either way, as I understand your question, the goal is to make sure there's some section of the tube where humans can survive at all times. I am also presuming that the population has the capability to adjust their habitation depth.
(For the sake of discussion, let's assume your typical composition of roughly 78% nitrogen and 21% oxygen (see note 1 below), that the moon has a uniform internal composition (see note 2), that we're ignoring air compression factors, and that you can maintain a comfortable temperature at all levels of your tube (otherwise, it would get far too hot for people to survive the deeper you went due to pressure, and at some point the gases might even liquefy). I.e., all we want is a simple approximation of air pressure.)
Scenario 1: Start off with enough gas to last you the entire time, without ever adding more:
In this case, you would want to fill the tube initially with enough air so that you have a comfortable slice as near to the top as possible. As air gradually bleeds away into space, the air pressure throughout the tube will decrease, so you move your population further down into the tube to compensate.
So how deep would the starting depth need to be? Here on Earth, roughly 99.0% of the total mass of the atmosphere is below 30 km, 99.5% below 50 km, and 99.9% is below 100 km (or the Kármán line; also see this page and this graph). Our moon has 1/6th the Earth's gravity, so very roughly speaking, the same average pressure you'd feel here on Earth at sea level would be somewhere between 300 and 600 km deep into your hole. If you're okay with the starting pressure being a bit lower, you might be able to raise the upper depth to 285 - 250 km before average people start having issues (like death).
If your tube is many, many kilometers in diameter, the air inside could definitely last several centuries to a millennia or more, depending on the volume.
Scenario 2: Replenish the gas continually:
This is the simpler situation to manage. 279
You decide how deep into the hole you want your humans to inhabit, and simply fill in as much air as needed until you reach your target pressure for a given depth. You constantly pump in more gas to replace the air that bleeds out into space. This also has the advantage that you can freely alter the depth that your populace occupies, should you ever have a reason to.
Also worth mentioning is that the more atmosphere above your head, the more protection you theoretically receive from radiation.
Obviously, we're making a lot of assumptions here, and the math is only a very course estimation. But this should essentially give you an idea of what your desired environment would necessitate.
(Note 1: Beyond the scope of this question, altering the gaseous mixture can affect the range of pressure a human can safely tolerate. See here, here, and here.)
(Note 2: It doesn't in reality, but that doesn't really affect this answer. See here. Likewise, I'm ignoring any effects from the moon's rotation.)
(Original answer follows.)
Or, is the Moon's gravity too weak to bind that atmosphere?
Correct; the moon cannot sustain an atmosphere mimicking typical Earth atmospheric composition. For starters, the molecular speed of the primary gases would exceed escape velocity. (Even though the moon's exosphere does naturally contain some trace amounts of various elements, and even a bit of water vapor, it's still essentially a vacuum.)
Assuming such atmosphere would be actively stabilized to ~20°C where the pressure was at least 13 kilopascals, and the top end of the pit is subject to the same boiling-off any previous Moon atmosphere was.
How would you accomplish this anyway if the hole is exposed to space? What would keep the air from flying out of the hole under its own pressure?
Since you're using unobtanium in the first place, would it not make more sense to construct an enclosed, pressurized tube, rather than one exposed to space? You would also be able to avoid other problems more easily, like radiation hazards.
In any case, gravity cannot keep the atmosphere from escaping the hole. 279