The officer detailed to command a naval base shall be an officer of the line in the Navy, eligible for command at sea.