首页 > 代码库 > Linux系统通过console口连接交换机

Linux系统通过console口连接交换机


一、安装minicom
Ubuntu安装:sudo apt-get install minicom、
centos安装:yum install minicom
二、配置minicom
Ubuntu输入:sudo minicom -s
centos输入:minicom -s ##进入配置界面
            +-----[configuration]------+    
            | Filenames and paths      |    
            | File transfer protocols  |
            | Serial port setup        |    ###点进Serial port setup
            | Modem and dialing        |
            | Screen and keyboard      |
            | Save setup as dfl        |
            | Save setup as..          |
            | Exit                     |
            | Exit from Minicom        |
            +--------------------------+

查看串口名称使用 ls -l /dev/ttyS* ,一般ttyS0对应com1,ttyS1对应com2;
查看串口驱动:cat /proc/tty/drivers/serial
查看串口设备:dmesg | grep ttyS* (查出那个串口激活了)
+-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyS1                                |
    | B - Lockfile Location     : /var/lock                                 |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 9600 8N1                                  |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+
            | Screen and keyboard      |
            | Save setup as dfl        |
            | Save setup as..          |
            | Exit                     |
            | Exit from Minicom        |
            +--------------------------+
标红色是需要修改的地方,A改为那个端口激活了,E改为:9600 8N1
改完Save setup as dfl,保存一下
再在命令行输入minicom,连接到交换机。

 




Linux系统通过console口连接交换机