In a statement released on Sunday, Libya's army said that its troops would observe the ceasefire from midnight local time (2200 GMT) on the same day.
The army also said it would monitor the situation on the ground "to prevent any change in front lines or transportation of weapons and ammunition," which it would consider a violation of the truce.
The statement added that the army would, however, continue to pursue "terrorists" and that soldiers "have been given the right to defend themselves if they come under fire."
Ahead of UN-brokered peace talks that resume in Geneva next week, the world body hailed Sunday's ceasefire as a "significant" step towards ending months of violence.
Just hours before the ceasefire was declared on Sunday, the UN Security Council had threatened to impose sanctions on any party that obstructed peace efforts in the North African country.
On Friday, the Islamist-led militia Libya Dawn, based in Libya's capital, Tripoli, said that it too had agreed to a ceasefire on the condition that rival factions respected the truce.
It also pledged to open up "safe passages to channel humanitarian aid," especially in Libya's battleground second city of Benghazi.
Unlike representatives of Libya's recognized government, however, Libya Dawn did not participate in the first round of talks in Geneva last week.
Since Moammar Gadhafi was overthrown in 2011 after 42 years as the country's de facto ruler, Libya has gradually descended into ever deeper conflict, with rival governments and powerful militias battling for control of its main cities and oil wealth.
UN special envoy to Libya, Bernardino Leon, also warned last week of the threat of Libya becoming a hotbed of Islamist insurgency.
ksb/tj (AFP, dpa)