Map from Google - Libya

In Libya the climate is Mediterranean in the thin coastal strip, and desert in the interior. In fact, although the temperatures are typical of the Mediterranean climate, the rains on the coast are scarce, so that the desert is found even in a part of the coast, i.e. in the Gulf of Sidra (or Sirte), while in Tripolitania and Cyrenaica there is a bit of vegetation. Only in the hills behind the coast of Cyrenaica (called Jebel Akhdar), the precipitation amount goes from 400 to 700 millimetres (16 to 27.5 in) per year, and they are covered by a Maquis shrubland.
Along the coast, the only plains area that receives non-sporadic rains, most of the rainfall occurs from October to early April, with a peak in December and January. The amount is usually low: between 200 and 350 mm (8 and 14 in) per year in Tripolitania and Cyrenaica, between 100 and 200 mm (4 and 8 in) in the Gulf of Sirte, which becomes definitely desert in the southern part, where the rainfall amount drops to 100 mm (4 in), and, beyond Cyrenaica, again around 100 mm (4 in) in the easternmost part of the coast, on the border with Egypt (see Tobruk). The rains on the coast are due to the passage of disturbances from the Atlantic or the Mediterranean, alternating with long periods of sunshine even in winter; since the period in which the rains fall is limited, in some years a decrease in winter rainfall may cause drought, whose effects are felt until the following autumn.
In summer, the sun shines and it almost never rains throughout Libya, although in the southern part of the desert, some showers may occur, due to the African monsoon which affects the Sahel region in the warmer months, and whose extreme offshoots can sometimes arrive here. Along the coast, the afternoon breezes blow, which give relief even though the air humidity is high, but in reality in summer the northern winds blow even at high altitude, as they are due to the baric configuration of the region, with the high pressure over the western part of the Mediterranean and the low pressure on the eastern side, and this is why the Libyan desert is less hot than the Algerian. The average maximum temperature in summer goes from 30 °C (86 °F) along the coast, to 35/37 °C (95/99 °F) in the north-central inland area, and up to 40/41 °C (104/406 °F) in the south.

Libyan desert

Throughout the year, but more often in spring and autumn, Libya may be affected by the Ghibli, a hot and dry wind raising dust and causing sudden increases in temperature; the phenomenon is even more evident along the coast, where it also produces a sudden drop in relative humidity, which is generally high due to the influence of the sea. In these cases, the temperature can exceed 40 °C (104 °F) from April to October, even on the coast, while in winter it can touch 30 °C (86 °F).
The main cities located on the coast (Tripoli, Benghazi, Misrata) have a Mediterranean climate: mild and quite rainy in winter, with a minimum temperature around 9/10 °C (48/50 °F) and a maximum around 17/19 °C (63/66 °F) in January and February, and hot, sunny summers, with highs in July and August of around 32 °C (90 °F) in the western part (see Tripoli, Al Khums), and 30 °C (86 °F) in the central and eastern part, which is more affected by the northern winds which blow in summer in the eastern Mediterranean.
Here are the average temperatures of Tripoli.
Average temperatures - Tripoli
Min (°C)91011141720222321181310
Max (°C)181921242730323331282319
Min (°F)485052576368727370645550
Max (°F)646670758186909188827366

Tripoli is the rainiest city, with 330 millimetres (13 inches) of rain per year, including 60/70 mm (2.4/2.8 in) per month between November and January; in Benghazi, the rainfall amounts to 260 mm (10.2 in) per year, while in Misrata, near the dry Gulf of Sirte, it amounts to just 190 mm (7.5 in); in Sirte, in the gulf of the same name, it's about 180 mm (7 in), and in Tobruk in the east, only 110 mm (4.3 in). Here is the average precipitation.
Average precipitation - Tripoli
Prec. (mm)60303015511015456070335

The sea temperature is warm enough for swimming from July to October, while it is a bit cool in June and November.
Sea temperature - Tripoli
Sea (°C)171616171922252726242219
Sea (°F)636161636672778179757266

Proceeding inland, the summer temperature increases quite rapidly: already at the Tripoli International Airport, 25 kilometres (15 miles) from the coast, highs in July and August rise to 35 °C (95 °F), and in el-Azizia to 37 °C (99 °F); the latter has been wrongly believed to be the hottest place in the world, due an incorrect measurement carried out in 1922.
A special case is represented by Bayda, at 600 metres (2,000 feet) above sea level, on the hills of Cyrenaica, which receives 540 mm (21 in) of rain per year, and in winter can even see the snow, because of the altitude. Here is the average precipitation.
Average precipitation - Bayda
Prec. (mm)1208560307211125560110544

The daily average temperature here goes from 10 °C (50 °F) in January and February, to 23.5 °C (74.5 °F) in August.
Average temperatures - Bayda
Min (°C)66810141718181715118
Max (°C)141518222630292928262117
Min (°F)434346505763646463595246
Max (°F)575964727986848482797063

South of Tripoli, there is a mountain range, the Nafusa Mountains, where there are some cities located at a higher altitude (not more than 1,000 metres or 3,300 feet), such as Nalut, Zintan, Lefren, Gharyan, which in winter are slightly colder than the same Bayda.

Snow in Bayda

In the vast desert region of Libya, the sunshine prevails throughout the year. During winter, the temperature range is high, so the nights are cold (the temperature can also go down around freezing (0 °C or 32 °F), and even a few degrees below in the north-central part), while the days are pleasant, around 20 °C (68 °F). The daytime temperature exceeds 30 °C (86 °F) from April to October. In summer, the highest recorded temperatures are around 50 °C (122 °F). The rains are very scarce and sporadic, in the form of downpour: some areas can see no rain for years. The desert is almost everywhere uninhabited, except near the oases, fed by springs of water that emerge from the ground, like the oases of Kufra and Sabha.
Average temperatures - Sabha
Min (°C)571116202423232117116
Max (°C)192226323639383836312520
Min (°F)414552616875737370635243
Max (°F)667279909710210010097887768

When to go

While waiting for the conditions of the country to be normalized, we can give some indication on when to visit. To visit Tripoli, Benghazi and the main cities of the north, you can choose spring and autumn, and in particular from mid-March to mid-April and from mid-October to mid-November.
To visit the desert areas, you can choose the winter, from December to February, keeping in mind that it can get cold at night.
The bathing season runs from mid-May to mid-October, although as we have seen the sea begins to be warm in July.

What to pack

In winter: in Tripoli and the coast, spring/autumn clothes, a jacket and a sweater, raincoat or umbrella. In the desert, spring/autumn clothes, light for the day, scarf for the wind-borne sand and dust, sweater, wind jacket, warm jacket for the night. In Bayda and Nafusa Mountains, it's better to add some warm clothes, sweater or fleece, down jacket.

In summer: in general, loose fitting, light-coloured clothing, light and long shirt and pants, a wide-brimmed hat, a light scarf, sunglasses (even graduated instead of contact lenses), comfortable and breathable shoes; for women it is best to avoid shorts and miniskirts. On the coast, a light sweatshirt for the evening; in the desert, a sweatshirt for the night, sleeping bag to sleep outdoors, desert boots or sandals.