[英]Raspberry PI Setup commands
I am having some trouble with this setup 我在此设置上遇到了一些麻烦
Raspberry PI Setup Raspberry PI设置
I am sure it is simple, but considering that I am new to using a mac and its terminal, some things are not so linear for me. 我敢肯定这很简单,但是考虑到我对使用Mac及其终端并不陌生,所以有些事情对我而言并不是那么线性。
For example, after adding the two lines: 例如,添加两行后:
i2c-bcm2708
i2c-dev
Do I type :x
to save and exit to then move on to the next sudo command? 我是否键入
:x
保存并退出然后继续执行下一个sudo命令?
After typing the second sudo command $ sudo vi /etc/modprobe.d/raspi-blacklist.conf
what are the correct steps to commenting out the blacklist? 键入第二条sudo命令
$ sudo vi /etc/modprobe.d/raspi-blacklist.conf
, 注释掉黑名单的正确步骤是什么?
Could someone please help me with the exact bash commands necessary to complete this setup? 有人可以帮我完成此设置所需的确切bash命令吗?
For commenting out the lines in a file, you could use sed
, 要注释掉文件中的行,可以使用
sed
,
sudo sed -ni '/i2c-bcm2708/s/^/#/p' /etc/modprobe.d/raspi-blacklist.conf
Example: 例:
$ sed -n '/i2c-bcm2708/s/^/#/p' file
#<TH bgcolor=#7070ff>DATAbase</th> i2c-bcm2708
It comment out the line which contains the string i2c-bcm2708
. 它注释掉包含字符串
i2c-bcm2708
。
I added sudo
because /etc
directory would be owned by root. 我添加了
sudo
因为/etc
目录将由root拥有。 To edit the files owned by root, you need super user do( sudo
) privilege. 要编辑root拥有的文件,您需要超级用户do(
sudo
)特权。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.