Typing in commands one by one is a pain in the ass.

Entering the configuration commands one by one can be a pain in the ass. This is especially troublesome when you have to configure multiple layer 2 switches. The configuration commands for layer 2 switches are generally the same. It is very troublesome to repeatedly enter the same configuration commands.

Let’s enter all the commands at once.

When entering commands, you can enter multiple commands in batches instead of just entering them one at a time from the terminal software. The procedure for entering commands in batches is as follows

  1. Create a text file of commands to be entered in batches in advance
  2. Copy and paste the text of a command created in a text file into a terminal software

First, put all the commands you want to enter in batches into a text file. In that case, you can use an abbreviated form of the command. Also, you don’t need to worry about the order of the commands or indentation as shown in show running-config.

Some commands have dependencies and you have to worry about the order.

By copying and pasting a group of commands in a text file into the terminal software, the commands are entered in batches. The configuration commands are entered in global configuration mode as the starting point, so copy and paste them after entering the global configuration mode. Alternatively, a text file may contain the commands for entering global configuration mode.

Fig. Batch entry of commands
Fig. Batch entry of commands

Related articles