I read this a long time ago when I was young. I read it on my dad's kindle and have no idea what the title could be. I believe it was about a man that was abducted by an alien ship and woke up after being surgically worked on. He escaped the room and killed an alien goat-like thing. He then assumed control of the ship and I think there were nanobots involved. The ship could also create different things. That's all I remember, I just remember that young me thought it was a really cool book. It could have been 6-10 years ago, but the book itself could have been older.
I am pretty sure you are talking about the book The Quantum Connection (Warp Speed #2) by Travis S. Taylor
In the book, a man is abducted by an alien ship. Like you say, he kills an alien, assumes control of the ship, and nanobot are definitely involved. Before reading this book, though, you might want to read Warp Speed, the first book in the series. The situations and many of the characters in The Quantum Connection come from the book Warp Speed.
I believe the book you are looking for is "Swarm (Star Force #1)" by B.V. Larson. I was looking for this book also, and just happened to find the correct link.
Earth arms marines with alien technology and builds its first battle fleet!
Kyle Riggs is snatched by an alien spacecraft sometime after midnight. The ship is testing everyone it catches and murdering the weak. The good news is that Kyle keeps passing tests and staying alive. The bad news is the aliens who sent this ship are the nicest ones out there....