Momentum of a gas expanding into a vacuum chamber in outer space Consider a gas expanding adiabatically from a gas chamber through an orifice into a vacuum chamber as shown in the schematic figure. In order for significant number of gas molecules (which we refer to as particles for simplicity), to transition into the vacuum chamber, the center of mass of the collection of all the gas particles must have a velocity which points rightwards towards the vacuum chamber. We assume that the container shown in the figure below is placed far away from all other physical objects, say in outer space, so that there are no external forces acting on it or it's contents.

How is linear momentum conserved during the transient phase of
expansion of the gas from it's resting chamber to the vacuum chamber?

$\qquad \qquad \qquad \qquad \qquad$ 
 A: Because the gas imparts a transient recoil to the enclosure.
It is no different, in principle, to a pellet being fired from an air gun and hitting a mesh welded over the opening of the barrel. The expanding air forces the pellet along the barrel causing a recoil. When the pellet hits the mesh it causes an impulse on the gun opposite to the direction of the original recoil.  We end up with the centre of gravity of the gun/pellet unchanged, but the gun will be displaced backwards somewhat and the pellet displaced forwards.
A: At any moment there will be particles moving in each direction, bouncing on the walls and changing direction. The pressure on the walls of the chamber is due to this bouncing.
Those who go through the hole are not reflected by the wall. Thus though the pressure rapidly equalizes in the entire left chamber, the force on the left-hand-side wall is the pressure times the entire surface, while on the right-hand-side wall, the pressure acts on the surface minus the size of the hole. It thus transmits a non vanishing total force on the left hand side chamber.
As long as the amount of gas in the right hand side chamber is small, during the transient phase, there is no compensating force on the right-hand-side chamber. The entire solid box, during the transient phase, receives a total momentum to the left, and if not connected to any object, (floating in the vacuum ?) it will move to the left.
When pressures are equalized in both chambers, the total force on the solid box as a whole is zero. Not only that, but since the gas has stopped moving as a whole, the right hand side chamber has finally given back to the gas all the momentum the left hand side chamber had received at the beginning, so there is no momentum left, neither in the gas nor in the solid and all macroscopic motion stops.
But the box as a whole will have moved left before stopping, by just the amount needed for the center of mass of the whole thing, box plus gas, to stay put.
If the box is on a table, for instance, friction will resist to its motion, but some momentum is transmitted to the table and from the feet of the table to the ground.
A: What you are talking about is often refereed as Adiabatic free expansion of a gas or Joule expansion
I would like to quote the page Adiabatic process from wikipedia

For an adiabatic free expansion of an ideal gas, the gas is contained in an insulated container and then allowed to expand in a vacuum. Because there is no external pressure for the gas to expand against, the work done by or on the system is zero. Since this process does not involve any heat transfer or work, the first law of thermodynamics then implies that the net internal energy change of the system is zero. For an ideal gas, the temperature remains constant because the internal energy only depends on temperature in that case. Since at constant temperature, the entropy is proportional to the volume, the entropy increases in this case, therefore this process is irreversible.

Extensive description can be found in Joule expansion (see note number 3).
So to conclude, no work against the environment during the expansion, means no change in quantities such as momentum, energy, temperature ...
