linux minicom_如何通过示例安装和使用Linux Minicom命令教程?

Linux Minicom是一个命令行工具,用于通过串行端口连接设备,如路由器和交换机。本文介绍了在Debian、Ubuntu、Kali、Fedora、CentOS和RHEL上安装Minicom的方法,以及如何列出TTY设备、启动和退出Minicom、查看帮助菜单、调整串行线路参数等操作。
摘要由CSDN通过智能技术生成
linux minicom

linux minicom

minicom  is a little command-line based tool used to connect serial-lines. In a more pragmatic definition, minicom can be used to connect modems, routers and switch console ports via the serial port. Minicom is very similar features and user interface to the TELIX.

minicom是一个基于命令行的小工具,用于连接串行线。 用更实用的定义,minicom可用于通过串行端口连接调制解调器,路由器和交换机控制台端口。 Minicom与TELIX具有非常相似的功能和用户界面。

为Debian,Ubuntu,Kali,Mint安装 (Install For Debian, Ubuntu, Kali, Mint)

We can install minicom with the following command for deb based distributions.

对于基于deb的发行版,我们可以使用以下命令安装minicom。

$ sudo apt install minicom -y
Install For Debian, Ubuntu, Kali, Mint
Install For Debian, Ubuntu, Kali, Mint
为Debian,Ubuntu,Kali,Mint安装

为Fedora,CentOS,RHEL安装(Install For Fedora, CentOS, RHEL)

We can also install for rpm-based distributions like below.

我们也可以为基于rpm的发行版进行安装,如下所示。

$ sudo yum install minicom -y

列出tty设备 (List tty Devices)

We generally use minicom with a physical port where it connects to a serial device like a switch, router, PBX, etc. Current PC configuration generally does not provides serial ports and prefer to use USB devices. We can use USB to serial converter. We can list existing serial lines or USB converted serial lines simply named tty with the following command.

我们通常将minicom与物理端口一起使用,该端口将物理端口连接到交换机,路由器,PBX等串行设备。当前的PC配置通常不提供串行端口,而更喜欢使用USB设备。 我们可以使用USB到串行转换器。 我们可以使用以下命令列出现有的串行线或USB转换的串行线,简称为tty

$ dmesg | grep tty
List tty Devices
List tty Devices
列出tty设备

We also learn from the output that the TTY device base baud rate is 115200. Alternatively, the device can be named ttyUSB because modern TYY devices are created with USB hardware to connect computers.

我们还从输出中了解到,TTY设备的基本波特率为115200。该设备也可以命名为ttyUSB,因为现代的TYY设备是使用USB硬件创建的,用于连接计算机。

启动Minicom (Start Minicom)

We can start minicom without any option or parameter but providing a serial device is a better way. We will provide a USB-Serial converter which is located at /dev/ttyUSB0  . We should provide the sudo  command for root privileges.

我们可以在没有任何选项或参数的情况下启动minicom,但提供串行设备是更好的方法。 我们将提供一个USB-Serial转换器,位于/dev/ttyUSB0 。 我们应该为根特权提供sudo命令。

$ sudo minicom /dev/ttyUSB0

退出Minicom (Exit Minicom)

After connecting minicom we may need to exit. But things work differently in minicom application. CTRL a  is used for special keys and other keys are used for different actions. We can exit like below.

连接minicom后,我们可能需要退出。 但是在minicom应用程序中,情况却有所不同。 CTRL a用于特殊键,其他键用于不同的动作。 我们可以像下面那样退出。

CTRL a, x
Exit Minicom
Exit Minicom
退出Minicom

帮助菜单 (Help Menu)

We can get help with the CTRL a, z  like below.

我们可以像下面的CTRL a, z获得帮助。

CTRL a, z
Help Menu
Help Menu
帮助菜单

We can see that generic help information about different actions like Clear Screen ,Configure Minicom ,Send Files etc. listed in this help screen. All of the following options should be used with the CTRL+A keyboard shortcut.

我们可以看到此帮助屏幕中列出了有关不同操作(如“ Clear Screen ,“ Configure Minicom ,“ Send Files等)的一般帮助信息。 以下所有选项应与CTRL+A键盘快捷键一起使用。

Dialing directory..D  
run script (Go)….G
Clear Screen…….C                                                                  
Send files………S  
Receive files……R 
cOnfigure Minicom..O                                                             
comm Parameters….P  
Add linefeed…….A
Suspend minicom….J 
Capture on/off…..L  
Hangup………….H
eXit and reset…..X
send break………F 
 initialize Modem…M 
Quit with no reset.Q
Terminal settings..T 
 run Kermit………K
Cursor key mode….I
lineWrap on/off….W  
local Echo on/off..E
Help screen……..Z
Paste file………Y  
Timestamp toggle…N
scroll Back……..B
Add Carriage Ret…U                                         

列出当前的串行线参数(List Current Serial Line Parameters)

We can list current serial line communication parameters like below.

我们可以像下面列出当前的串行线路通信参数。

CTRL a, p
List Current Serial Line Parameters
List Current Serial Line Parameters
列出当前的串行线参数

We can select the Speed ,Parity, Stopbits and Data options from this menu by using letters. For example, to select speed 111200 we will press the E key. We can change the parity to None with L, Even with M, Odd with N, Mark with O and Space with P keys.

我们可以使用字母从此菜单中选择SpeedParityStopbitsData选项。 例如,要选择速度111200,我们将按E键。 我们可以奇偶改为None与L, Even有男, Odd与N, Mark与O和Space以P键。

LEARN MORE  WPS (Wi-Fi Protected Setup) Tutorial With Examples
了解更多有关示例的WPS(Wi-Fi保护设置)教程

更改串行线路参数(Change Serial Line Parameters)

We can change serial line parameters while starting the minicom. We need to provide the required options and values. Some of the most used options are as below.

我们可以在启动minicom时更改串行线路参数。 我们需要提供所需的选项和值。 一些最常用的选项如下。

$ sudo minicom -b 1200 -8 /dev/ttyUSB0

设定模式 (Setup Mode)

minicom provides an easy way to set up serial line parameters in command line GUI. We can provide the -s option and enter.

minicom提供了一种在命令行GUI中设置串行线路参数的简便方法。 我们可以提供-s选项并输入。

Setup Mode
Setup Mode
设定模式

and enter the Serial port setup  menu like below.

然后进入如下所示的Serial port setup菜单。

Setup Mode
Setup Mode
设定模式

翻译自: https://www.poftut.com/install-use-linux-minicom-command-tutorial-examples/

linux minicom

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值