This electronic device has a configuration that allows attachment and detachment of a first unit and a second unit. The second unit is provided with a socket. The socket is provided with a socket main body, and an operation member for performing a release operation for releasing the engagement by a lock mechanism that allows attachment and detachment of the first unit and the second unit. The socket main body comprises a first wall portion, and a second wall portion. The operation member comprises a first operation unit disposed on the outer surface of the first wall portion, and a second operation unit disposed on the outer surface of the second wall portion.