Ghost in the Machine (The X-Files)

"Ghost in the Machine"
The X-Files episode
Episode no.Season 1
Episode 7
Directed byJerrold Freedman
Written byAlex Gansa
Howard Gordon
Production code1X06
Original air dateOctober 29, 1993 (1993-10-29)
Running time45 minutes
Guest appearances
Episode chronology
← Previous
"Shadows"
Next →
"Ice"
The X-Files season 1
List of episodes

"Ghost in the Machine" is the seventh episode of the first season of the American science fiction television series The X-Files, premiering on the Fox network on October 29, 1993. It was written by Howard Gordon and Alex Gansa, and directed by Jerrold Freedman. The episode featured guest appearances by Wayne Duvall and Rob LaBelle, and saw Jerry Hardin reprise his role as Deep Throat for the first time since the character's introduction. The episode is a "Monster-of-the-Week" story, unconnected to the series' wider mythology. "Ghost in the Machine" earned a Nielsen household rating of 5.9, being watched by 5.6 million households in its initial broadcast, and received mixed reviews from critics.

The show centers on FBI agents Fox Mulder (David Duchovny) and Dana Scully (Gillian Anderson) who work on cases linked to the paranormal, called X-Files. In this episode, Mulder is asked by his old partner from the Behavioral Analysis Unit to aid an investigation into a murder at a software company. Soon, he and Dana Scully (Gillian Anderson) uncover a malevolent artificial intelligence which has started killing to protect itself.

Writers Gordon and Gansa have admitted they were "not computer literate" and felt this was a detriment to their writing. The scenes set at the software company Eurisko were filmed at the Metrotower complex in Burnaby, British Columbia, Canada, a building used by the Canadian Security Intelligence Service. The location was barely big enough for the actors to perform in after the crew had finished setting up the necessary equipment. Mulder and Scully would once again face a malevolent AI in the William Gibson-penned fifth season episode "Kill Switch".