Thinking that turning off the Internet was a good way to combat the social media movements in Egypt, all Mubarak managed to accomplish was to drive people who found themelves without a voice to go out and protest. Learning nothing from that experience, Lybia has done the same, an action which may simply accellerate Ghaddafi's fall.
According to this article in the Wall Street Journal, however, Egypt and Lybia should have borrowed a page from Russia, China and Iran: these countries have elaborate firewalls, paid bloggers who spread government propaganda and are not shy to performing cyber attacks on the websites of bloggers or activist organizations that speak against the regimes. Meanwhile, the only thing Egypt did was to beat up and jail its bloggers -- and all it accomplished was to put more fuel on their cause.
Take for example the tragic death of Khaled Said, a 28-year-old who in June 2010 was dragged from an Internet cafe in Alexandria and beaten by the Egyptian police: this is the event that galvanized young Egyptians, pushing them to share their grievances on Facebook. As the article explains:
A group called "We Are All Khaled Said" quickly reached hundreds of thousands of members and played an instrumental role in promoting the protests that eventually swept Hosni Mubarak from power.
Compare Egypt's experience, where in 2009 Li Qiaoming, a 24-year-old peasant detained for illegal logging, was soon reported dead. The police told Mr. Li's parents, implausibly, that he had hit his head on a wall while playing a game of hide-and-seek with fellow inmates. The incident quickly generated almost 100,000 comments on just one popular Chinese blogging site, and the authorities reacted quickly.
Instead of trying to suppress online conversation, they reached out to the outraged netizens, inviting them to apply to become members of a commission to investigate the circumstances of Mr. Li's death. The resulting commission wasn't really allowed to investigate anything, of course, but by then the social unrest was quelled.