It also depends on where it is. Within the gravity range of the earth, the bullet will not move in a straight line, which is equivalent to the moon's revolution around the earth. Even if you leave the gravity range of the earth, you can't escape the gravity of the sun, just like the earth revolves around the sun. If you are not in the solar system, you will also be attracted by the Milky Way. Assuming that there is no obstacle, the bullet will move around the planet at a constant initial speed. It is impossible to move in a straight line, and even light cannot move in a straight line. If it is shot within the gravity range of the earth, the bullet is likely to return to the launch point. I think the first thing to determine is whether to shoot inside or outside the capsule. Shooting in a space capsule is naturally caused by the gravity of the earth, and the energy is gradually attenuated and eventually melted by the atmosphere.
Outside the capsule, I'm not sure I can shoot. Because the firing is that the firing pin hits the fuse, the energy generated by the powder explosion is converted into the kinetic energy of the warhead. Because it is outside the cabin, there is no oxygen, and the gunpowder has no conditions for explosion. It should be a dud. Even if you answer this question, you will only say that there are two kinds, one is infinite, and the other is that it will change when it encounters any gravity and resistance, even scientists all over the world now. Physicists will answer this question, and they will only say what problems will occur under what circumstances. If you shoot on the space station, you may encounter or what will happen. After all, there are some things that we can't arrange and decide. We can only let go of our imagination and prove all the problems with our brains and hands.