Self-awareness was one's own recognition of oneself as an individual. Self-awareness, along with intelligence and consciousness, were markers that indicated sentience in an individual, according to Bruce Maddox. (TNG: "The Measure Of A Man")
Developing self-awareness Edit
Though generally said of biological lifeforms, artificial lifeforms, such as androids (TNG: "The Measure Of A Man") and holograms (TNG: "Elementary, Dear Data", "Ship in a Bottle",VOY: "Eye of the Needle") could also become self-aware, primarily due to the sophistication of their programming, which allowed them to learn and expand their abilities over time.
In 2365, Bruce Maddox testified during Data's hearing to determine whether the android had the right to refuse to be disassembled for research conducted by Maddox himself. As Data's advocate, Picard asked Maddox to go through the markers of sentience and apply them to him (Picard) and ultimately Data.
After discussing with Maddox whether Data was intelligent, Picard asked Data why he was here. Data responded, "I am taking part in a legal hearing to determine my rights and status. Am I a person or property?" Picard continued, asking Data what the hearing's stakes were, to which Data answered, "My right to choose. Perhaps my very life." Picard emphasized Data's use of the personal pronoun to suggest that Data was, in fact, self-aware. Maddox, for his part, continued to insist that Data was a machine throughout the hearing, which ultimately ended in Data's favor.
After Data expressed his interest in cooperating with Maddox in a way that did not end in his destruction, Maddox remarked to the hearing's judge, Phillipa Louvois, "He's (Data) remarkable." She noted the significance of the fact that despite his earlier wavering, Maddox had just chosen to refer to Data as a "he" rather than an "it". (TNG: "The Measure Of A Man")
The first known instance of a hologram developing self-awareness occurred in 2365, when, in response to Geordi La Forge's request that the USS Enterprise-D's holodeck computer create an adversary that could outwit Data, a powerful version of Professor James Moriarty was produced who managed to gain control of Enterprise's computer. (TNG: "Elementary, Dear Data")
Later, upon being re-activated by Reginald Barclay in 2369, he described himself as self-aware, able to experience the passage of time despite being trapped in the Enterprise's computer system. When Jean-Luc Picard came to speak to him upon his request, he expressed his desire to leave his "prison". Picard explained that despite the fact that many minds were trying to find a way to allow him to leave the holodeck, none had been successful as of yet. Unable to bear another moment in his confinement, Moriarty proved his status as an alive being by appearing to exit the holodeck.
In reality, he had created a realistic holo-simulation of the Enterprise and trapped members of the crew in it, with the goal of obtaining the release he sought for himself and Countess Regina Bartholomew, a fellow holographic character he had fallen in love with. Turning Moriarty's strategy against him, Picard was able to convince him that they were departing the Enterprise on the shuttle Sakharov, when in reality they were confined to a stand-alone unit that was continuously running a holoprogram meant to simulate unlimited space travel for their enjoyment. (TNG: "Ship in a Bottle")
The Doctor Edit
In 2371, after seeing an injured Walter Baxter's disrespectful dismissal of The Doctor, behavior which was systemic among the crew of USS Voyager, Kes approached Captain Kathryn Janeway with her concerns about the way the crew were treating him. She had noted that they often ignored him, insulted him, or talked about him while he was in the room, actions she considered disrespectful. Janeway, playing devil's advocate, explained that the crew had complained about The Doctor's rudeness and lack of bedside manner, adding that they were considering re-programming him, as he was only a holoprogram. Kes protested that he was alive: "He's self aware, he's communicative, he has the ability to learn." When Janeway attributed that to his sophisticated programming, Kes continued to push the issue until Janeway relented.
When Janeway later approached The Doctor, she told him that he was no longer just an emergnecy measure, but a full member of the crew. Rather than re-programming him, which he initially believed she was suggesting, she asked him whether he needed or wanted anything. Surprised, he expressed his wish that people would deactivate him when they left sickbay, only not at an inconvenient moment. As that action would likely have cemented the crew's opinion that he was just a tool, she offered the alternative of allowing him to control when he was deactivated.
Upon embracing his status as a self-aware entity, The Doctor asserted himself when Baxter returned with a new injury, threatening to discuss the lieutenant's over-zealous exercise regimen with his superior officer if he came in once more with an exercise-related injury. Properly chastised, Baxter finally demonstrated respect, calling him "sir". Discussing his new status as a crew member with Kes, The Doctor asked her to give Janeway a list of supplies he wanted for sickbay. He also expressed a wish for a name. (VOY: "Eye of the Needle")
Self-aware machines Edit
Despite strong evidence in favor of self-awareness, these lifeforms weren't always considered so by others, and as such, were often the subject of abuse and legal challenges to their personhood. (TNG: "The Measure Of A Man", VOY: "Eye of the Needle", "Author, Author")
In addition, an individual's self-awareness could be thwarted. In a hive mind such as that of the Borg, individuals who had been assimilated lost their self-awareness and thought of themselves as parts of a larger whole. This was exemplified by their frequent use of the phrase "We are Borg" rather than introducing themselves personally. Hugh, for instance, continued to refer to himself as "we" even while detached from the Borg Collective until a conversation with Picard. (TNG: "I Borg" et al.)
One's sense of self could be impeded by the presence of other personalities in one's psyche. In 2375, Seven of Nine's self-awareness was hampered by the presence of several other individuals after being exposed to a Borg vinculum; as a result, she developed something akin to multiple personality disorder, manifesting as various individuals assimilated at one point by the Collective. (VOY: "Infinite Regress")