# Configuration

To configure the device, we configure from the terminal; type the command **configure terminal** followed by **\[return]**.

<figure><img src="https://3809111052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxRpMyC8oFVYcAd6lVljo%2Fuploads%2F3ArYfcHqz2vXVO3OsUMV%2Fimage.png?alt=media&#x26;token=e2656755-5716-4c9a-b7ce-98283ab0740a" alt=""><figcaption></figcaption></figure>

The prompts clearly indicate that we are in config mode. One of the first things we do on a new system is to give it an unambiguous name, in this case I use the command **host Core1** followed by **\[return]**. The full command would be **hostname**.

<figure><img src="https://3809111052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxRpMyC8oFVYcAd6lVljo%2Fuploads%2FtF4hX2RMV9BXFIHDlcEP%2Fimage.png?alt=media&#x26;token=f4963ec0-6618-48e9-9b2d-2947b7406788" alt=""><figcaption></figcaption></figure>

You can see that the prompt has changed. In a convex environment, I might be working on several network devices simultaneously. This prompt is one of the reminders to me of which device I am currently working on. To exit from config mode, I used the command **exit** followed by **\[return]**. A shortcut used by most administrators is **\[ctrl] \[z]** and it works on most manufacturers’ equipment.

&#x20;From this point on, I am going to mention new commands and assume you press return!&#x20;

If you type **show run** and examine the top of the configuration, you can see a new line, hostname Core1. Clearly our configuration has changed. But if you type **dir** you will see the config file still has a zero length. When we make changes in the way I have been showing you, we are making changes to the running configuration in DRAM. The configuration file in flash memory is the *start-up configuration*. If I were to reboot now, the hostname change I’ve made would disappear. Try it! Use the command **reload** to reboot the switch, if you asked to save the system configuration, type **no**.&#x20;

Once the switch reboots, use the **show run** command to verify that the hostname has not been saved. Repeat the configurations commands on this page and name the switch again.&#x20;

To copy a file in any operating system the standard syntax is *copy \[source] \[destination]* and it is no different in most network switches. Try the **command copy running config start-up config** and then type **dir**; nothing changed in flash? If you try **dir nvram:** you should see a new configuration file. Now we know where things are kept!&#x20;

You can use a delete command to erase a file, for example the command **delete nvram:startup-config** should remove the configuration. We need to know this for later, where we will need to be able to manually manipulate configuration files.&#x20;

An easy way to wipe a pre-configured device is to use the command **erase startup-config** and this is the first command I would run before beginning a new configuration just in case someone had pre-configured something.&#x20;

If you mistype a command, the switch will attempt to do a DNS lookup of whatever you mistyped, until it times out. This is annoying! To prevent it doing this, type the command **no ip domain-lookup**
