只需要在接口视图下执行clear configuration this命令就可以一键清除接口下的配置啦
[tmall] interface gigabitethernet 0/0/1
[tmall-GigabitEthernet0/0/1] display this
interface GigabitEthernet0/0/1
description switch-A
port link-type access
#
return
[tmall-GigabitEthernet0/0/1] clear configuration this 清除接口下所有配置,恢复到缺省值
Warning: All configurations of the interface will be cleared,and its state will be shutdown. Continue? [Y/N] :y
Info: Total 2 command(s) executed, 2 successful, 0 failed.
[tmall-GigabitEthernet0/0/1] display this
#
interface GigabitEthernet0/0/1
shutdown / 清除接口下所有配置后,接口将处于关闭状态




