I read a short story online a while back which starts off with a guy being in the dark and asking where he is and panicking, and then a scientist starts asking him questions but he is super freaked out. Eventually he finds out that he is actually a consciousness on a disk that was donated by his body for a lot of money, and when he can't answer their questions well they restart him.

The story was written in a terminal type format, with the name of the character followed by : then dialogue. E.g.

< name here > : < what he says >

and the background of the page online was command line-esque.

I found this story on a blog, so I believe its not written by a major writer. Most likely amateur fiction.

1) "starts off with a guy being in the dark and asking where he is and panicking"

There was a moment of stillness. I couldn’t see anything, and when I
tried to move, I couldn’t feel myself moving. When I tried to speak, I
couldn’t hear myself speaking. Suddenly, and to my surprise, I could
‘hear’ Douglas’s voice...

2) terminal type and name/quote format

DOUGLAS: How are you doing in there? Feeling comfortable yet?

ZACH: This is pretty weird. But I’m okay.

DOUGLAS: Great.

3) finds out he is actually a consciousness on disk

There was a long pause. Douglas sighed.

DOUGLAS: I am not sure how to say this... Or even what to say.

Douglas sounded different. He was somber. His voice, unfamiliar.

DOUGLAS: In trying to build a machine that could pass the Turing Test,
a machine able to fool anyone into thinking that it was a human, I...

I felt chills along my spine. I was dizzy.

DOUGLAS: I had to build a computer was able to fool even itself. And
that computer is you.

However, the narrator was never originally a real human in this story.

This story seems really interesting but its not the same one. The one I'm thinking of had the main character interviewed by a series of scientists, and his body sold his consciousness.
– AbishekMar 26 '15 at 6:53