A mobile terminal comprising: a display unit configured to output an execution screen of an application for controlling a plurality of electronic apparatuses; a memory unit configured to store operation command information related to the plurality of electronic apparatuses, wherein the operation command information includes a first control command and a first condition for executing the first control command; and a controller configured to: receive a user's command with respect to the execution screen for generating new operation command information related to one or more electronic apparatuses among the plurality of electronic apparatuses, wherein the generated new operation command information includes a second control command and a second condition for executing the second control command; determine whether the first control command and the second control command are linked to each other for successive execution; and when the first control command and the second control command are not linked to each other, store the generated new operation command information, wherein, when the first control command and the second control command are linked to each other, the controller is further configured: to compare the first control command and the second control command; if the first control command and the second control command include multiple pieces of information relating to the driving of the same electronic apparatus, which are incompatible with one another, to not store the generated new operation command information; and to display an alert image representing that the generated new operation command information is not allowed to be stored when the generated new operation command information is not stored. a display unit configured to output an execution screen of an application for controlling a plurality of electronic apparatuses; a memory unit configured to store operation command information related to the plurality of electronic apparatuses, wherein the operation command information includes a first control command and a first condition for executing the first control command; and a controller configured to: receive a user's command with respect to the execution screen for generating new operation command information related to one or more electronic apparatuses among the plurality of electronic apparatuses, wherein the generated new operation command information includes a second control command and a second condition for executing the second control command; determine whether the first control command and the second control command are linked to each other for successive execution; and when the first control command and the second control command are not linked to each other, store the generated new operation command information, receive a user's command with respect to the execution screen for generating new operation command information related to one or more electronic apparatuses among the plurality of electronic apparatuses, wherein the generated new operation command information includes a second control command and a second condition for executing the second control command; determine whether the first control command and the second control command are linked to each other for successive execution; and when the first control command and the second control command are not linked to each other, store the generated new operation command information, wherein, when the first control command and the second control command are linked to each other, the controller is further configured: to compare the first control command and the second control command; if the first control command and the second control command include multiple pieces of information relating to the driving of the same electronic apparatus, which are incompatible with one another, to not store the generated new operation command information; and to display an alert image representing that the generated new operation command information is not allowed to be stored when the generated new operation command information is not stored. to compare the first control command and the second control command; if the first control command and the second control command include multiple pieces of information relating to the driving of the same electronic apparatus, which are incompatible with one another, to not store the generated new operation command information; and to display an alert image representing that the generated new operation command information is not allowed to be stored when the generated new operation command information is not stored.