解决办法1
因为版本更新现在已经不用inittab文件了
而是再这里找
代码
sudo raspi-config
我要找的是关闭串口登录的文件
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
需要用#注释掉行
sudo raspi-config
这个代码直接图形化了
先选interfacing options (各种接口的选项)
回车进入后 选serial(串口)再点击回车
这时会问你YES 还是 NO,要关闭串口登录所以选择NO.
再点击回车
又问你保存不保存选“是”。再出来的界面选确定
然后选Finsh(敲击键盘“→”)
完成
借鉴参考大神{感谢大神分享}
树莓派与Arduino通过GPIO串口通讯_YLEglo的博客-CSDN博客_树莓派gpio通信树莓派与Arduino通过GPIO串口通讯(感谢大佬,传送门)首先,启用串口ttyS0在root权限下#raspi-config进入系统配置界面选择Interfacing options在下方看到Serial回车先选No,禁用串口登陆然后Yes,启用串口ttyS0接着OK,并重启重启后#ls -la /dev/查看是否有ttyS0第二,关闭consoler...https://blog.csdn.net/CMChristel/article/details/104220550?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522164872320716782089374950%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=164872320716782089374950&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~first_rank_ecpm_v1~rank_v31_ecpm_bkp-3-104220550.142%5Ev5%5Epc_search_quality_down,143%5Ev6%5Econtrol&utm_term=%E6%A0%91%E8%8E%93%E6%B4%BE+arduino+gpio%E9%80%9A%E4%BF%A1&spm=1018.2226.3001.4187
第二种办法我没有试过
inittab配置文件
如下
### Beginning of inittab ###
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon
### End of inittab ###
完结
来自
Page Not Found
Page Not FoundPage Not Foundhttps://www.omnisecu.com/gnu-linux/redhat-certified-engineer-