使用undo命令行
在命令前加undo关键字,即为undo命令行。undo命令行一般用来恢复缺省情况、禁用某个功能或者删除某项配置。几乎每条配置命令都有对应的undo命令行。
下面给出使用undo命令行的示例供参考:
- 使用undo命令行恢复缺省情况
sysname命令是用来设置设备的主机名。举例如下:
<HUAWEI> system-view [HUAWEI] sysname Server [Server] undo sysname [HUAWEI]
- 使用undo命令禁用某个功能
ftp server enable命令是用来开启设备的FTP服务器功能。举例如下:
<HUAWEI> system-view [HUAWEI] ftp server enable Warning: FTP is not a secure protocol, and it is recommended to use SFTP. Info: Succeeded in starting the FTP server. [HUAWEI] undo ftp server Info: Succeeded in closing the FTP server.
- 使用undo命令删除某项设置
header命令是用来设置用户登录设备时终端上显示的标题信息。举例如下:
<HUAWEI> system-view [HUAWEI] header login information "Hello,Welcome to Huawei!"
退出设备后重新登录,在验证用户前,会出现“Hello,Welcome to Huawei!”,然后执行相应的undo header login命令:
Hello,Welcome to Huawei! Login authentication Password: Info: The max number of VTY users is 20, and the number of current VTY users on line is 5. The current login time is 2012-06-09 04:46:00. <HUAWEI> system-view [HUAWEI] undo header login
再次退出设备后重新登录,在验证用户前,则不会出现任何标题信息:
Login authentication Password: Info: The max number of VTY users is 20, and the number of current VTY users on line is 5. The current login time is 2012-06-09 04:52:10. <HUAWEI>
以上示例中设备的显示信息仅为示意,请以设备实际显示为准。