Zhuge Liang was born in 181 A.D. in Shandong Province in China, in the Southern Taishan district. Originally the family's surname was "Ge", but the emperor gave the family the district of "Zhu" in memory of the service rendered by a particular ancestor named General Ge Ying. After several generations, the name of the place "Zhu" and the family name "Ge" became linked together.
Zhuge Liang was the second son in the family, and apart from an elder brother (Zhuge Jin, who would later serve Sun Quan in Wu) and a younger brother, Zhuge Jun, he had two elder sisters. His parents both died when Zhuge Liang was in his teens.
It was already a time of instability. The infamous Yellow Turbans uprising occurred around the time of his father's passing, and the area in which he spent his youth was troubled by intense military disturbance.The family moved from their hometown when Zhuge Liang was fourteen years old, and lived with an uncle (Zhuge Xuan) who had been promoted to Governor of Yuzhang. Later they moved again to the city of Xiangyang when his uncle was relieved from his post. Not long after this, Zhuge Xuan died of an illness. Zhuge Liang was only seventeen. He and his siblings went west to a rural area called Longzhong, bought a plot of land, and settled down to grow their own produce in an agricultural life. Longzhong was where Zhuge Liang would spend the next ten years in serious study and keen observation of the events outside.
(I think it's important to remember that apart from improving his mind in the scenic countryside, Zhuge Liang really did put in plenty of physical labour to till the fields. (There is also mention that he designed various ingenious agricultural tools, like special irrigation pipes, waterwheels, etc.) Thinking of Zhuge Liang as a great strategist, scholar and inventor doesn't seem to blend well with this, but it is a truth nevertheless. Hence in battle, the enemy's favourite insult would often be "Zhuge, you farmer/country bumpkin!" Of course, the enemy would often realise later that hurling insults couldn't mend the terrible defeat they suffered at the hands of said farmer....)
Longzhong, being a place of relative stability in a troubled nation (due mostly to its being in a rural area) became the refuge of quite a few great thinkers, and Zhuge Liang was able to mix with these sage old men and absorb some of their teachings. They in turn were impressed by his earnestness, ability and general virtue.
At the same time, quite a few powerful young thinkers began emerging in this area, and they all met frequently for passionate debating sessions, poetry recitations, zither performances, drinking bouts (yep, we can't forget the drinking bouts). Zhuge Liang was considered by his elders to be at the forefront of a group of able young talents which included his friend Xu Shu and the eccentric Pang Tong.
Longzhong, by the way, was where Zhuge Liang met and married his amazing wife.
Zhuge Liang took five thousand troops and set out for Xicheng to remove the stores. But messenger after messenger, more than ten of them, came to report: "Sima Yi is advancing rapidly on Xicheng with an army of one hundred fifty thousand troops." No leader of rank was left to Zhuge Liang; he had only the civil officials and the five thousand soldiers, and as half this force had started to remove the stores, he had only two thousand five hundred left.His officers were all frightened at the news of near approach of the enemy. Zhuge Liang himself went up on the rampart. to look around. He saw clouds of dust rising into the sky. The Wei armies were nearing Xicheng along two roads. Then he gave orders: "All the banners are to be removed and concealed. If any officer in command of soldiers in the city moves or makes any noise, he will be instantly put to death." Next he threw open all the gates and set twenty soldiers dressed as ordinary people cleaning the streets at each gate. When all these preparations were complete, he donned the simple Taoist dress and, attended by a couple of lads, sat down on the wall by one of the towers with his lute before him and a stick of incense burning.
Sima Yi's scouts came near the city gate and saw all this. They did not enter the city, but went back and reported what they had seen. Sima Yi smiled incredulously. But he halted his army and rode ahead himself. Lo! It was exactly as the scouts had reported; Zhuge Liang sat there, his face with all smiles as he played the lute. A lad stood on one side of him bearing a treasured sword and on the other a boy with the ordinary symbol of authority, a yak's tail. Just inside the gates a score of persons with their heads down were sweeping as if no one was about.
Sima Yi hardly believed his eyes and thought this meant some peculiarly subtle ruse. So he went back to his armies, faced them about and moved toward the hills on the north.
"I am certain there are no soldiers behind this foolery," said Sima Zhao. "What do you retire for, Father?"
Sima Yi replied, "Zhuge Liang is always most careful and runs no risks. Those open gates undoubtedly mean an ambush; and if our men enter the city, they will fall victims to his guile. How can you know? No; our course is to retire."
Thus were the two armies turned back from the city, much to the joy of Zhuge Liang, who laughed and clapped his hands as he saw them hastening away. The officials gasped with astonishment, and they asked, "Sima Yi is a famous general of Wei, and he was leading one hundred fifty thousand troops. By what reason did he march off at the sight of you, O Minister?"
Zhuge Liang said, "He knows my reputation for carefulness and that I play not with danger. Seeing things as they were made him suspect an ambush, and so he turned away. I do not run risks, but this time there was no help for it. Now he will meet with Guan Xing and Zhang Bao, whom I sent away into the hills to wait for him."
They were still in the grip of fear, but they praised the depth of insight of their chief and his mysterious schemes and unfathomable plans.
"We should simply have run away," said they.
"What could we have done with twenty-five hundred soldiers even if we had run? We should not have gone far before being caught," said Zhuge Liang.
Quite open lay the city to the foe,
But Zhuge Liang's lute of jasper wonders wrought;
It turned aside the legions' onward march
For both the leaders guessed the other's thought.
"But if I had been in Sima Yi's place, I should not have turned away," said Zhuge Liang, smiling and clapping his hands.