"Device /dev/ttyS? is locked."

在使用minicom时,可能会碰到串口设备被锁的情况。如下: yesaidu@ywf-ubuntu:~$ sudo minicom Device /dev/ttyS0 is locked. 可以通过下面的办法来解决: yesaidu@ywf-ubuntu:~$ ls /var/lock LCK..ttyS0 subsys yesaidu@ywf-ubuntu:~$ kill 0 yesaidu@ywf-ubuntu:~$ ls /var/lock subsys yesaidu@ywf-ubuntu:~$ sudo minicom Welcome to minicom 2.3 道理如下: 转自http://linux.about.com/od/srl_howto/a/hwtsrl18t14.htm This means that someone else (or some other process) is supposedly using the serial port. There are various ways to try to find out what process is "using" it. One way is to look at the contents of the lockfile (/var/lock/LCK...). It should be the process id. If the process id is say 100 type "ps 100" to find out what it is. Then if the process is no longer needed, it may be gracefully killed by "kill 100". If it refuses to be killed use "kill -9 100" to force it to be killed, but then the lockfile will not be removed and you'll need to delete it manually. Of course if there is no such process as 100 then you may just remove the lockfile but in most cases the lockfile should have been automatically removed if it contained a stale process id (such as 100).
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值