The most useful Cisco OS commands

X – port number

How to check configuration for specific port

sh run int f0/X  or show running-config interface fastEthernet 0/X

How to check all configuration 

show running-config

How to change description on port

enable

configure terminal

interfaces  fastEthernet 0/X

description MY_NEW_DESCRIPTION

How to set up Trunk( Allow few VLAN’s to access one port)

configure terminal
interface FastEthernet0/X
description MY_NAME

switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan MY_VLAN1,MY_VLAN2

end

How to setup a Native trunk and what is

Windows is not tagging Vlan so you would need to sometimes setup Native VLAN tagging so all the packets which are not tagged will be given this VLAN tag

configure terminal
interface FastEthernet0/X

switchport trunk native My-VLAN

How to save running configuration

enable

copy running-config startup-config

How to restore default system files

This command might come handy for you if you are in trouble.

Make sure you know what you are doing.

C:\Windows\system32>sfc

Microsoft (R) Windows (R) Resource Checker Version 6.0
Copyright (C) Microsoft Corporation. All rights reserved.

Scans the integrity of all protected system files and replaces incorrect version
s with
correct Microsoft versions.

SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=<file>] [/VERIFYFILE=<file>]
[/OFFWINDIR=<offline windows directory> /OFFBOOTDIR=<offline boot directory>
]

/SCANNOW Scans integrity of all protected system files and repairs files
with
problems when possible.
/VERIFYONLY Scans integrity of all protected system files. No repair operati
on is
performed.
/SCANFILE Scans integrity of the referenced file, repairs file if problems
are
identified. Specify full path <file>
/VERIFYFILE Verifies the integrity of the file with full path <file>. No re
pair
operation is performed.
/OFFBOOTDIR For offline repair specify the location of the offline boot dire
ctory
/OFFWINDIR For offline repair specify the location of the offline windows d
irectory

e.g.

sfc /SCANNOW
sfc /VERIFYFILE=c:\windows\system32\kernel32.dll
sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDI
R=d:\windows
sfc /VERIFYONLY

C:\Windows\system32>