DC microgrids (MG) are getting more attention due to the increasing DC loads. Also, these systems have different advantages which have made them preferable over the AC MG. In this chapter, the optimal management of a DC MG is investigated to minimize the total operating cost of the system in the deterministic mode. In order to reduce the total operating cost, the demand response programs, which have a significant effect on reducing operating cost of the system, are utilized. The optimal management problem of DC microgrid is formulated as mixed-integer linear programming and solved under CPLEX solver in the GAMS optimization software. Different power sources as the upstream grid, wind turbine, distributed generation units, photovoltaic, and the battery storage system are considered to supply the load demand. A 16-bus test system is considered to get the optimal energy management of the DC MG.