Robert E Lee and Ulysses S Grant were the commanding generals of the Confederate and Union armies, respectively.
the union armies
Ulysses S. Grant.
no one
P.G.T. Beauregard
Sidney Johnston
P.G.T. Beauregard
Both armies had several different commanders in different sectors of the war. By 1864, Ulysses S. Grant was the general-in-chief of the Union (Northern/Federal) forces, while Robert E. Lee was the general commanding the Confederate (Southern/"Rebel") forces.
Jefferson Davis was the President of the Confederate States of America. As such he would have been the Commander in Chief of the Armies of the Confedracy.
Robert E. Lee was appointed chief of the Confederate Armies on February 6th 1865.
Robert E. Lee was offered command of the Union Armies by President Lincoln. He turned it down because he felt he was a Virginian first and could not fight against is State.
Jefferson Davis was the President of the Confederate States of America. Robert E. Lee was the commanding general of the Confederate Army.